@teemill/orders 1.24.1 → 1.26.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 +14 -9
- package/api.ts +560 -137
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +499 -137
- package/dist/api.js +127 -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 +499 -137
- package/dist/esm/api.js +126 -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/ImportOrders202Response.md +20 -0
- package/docs/Order.md +18 -17
- package/docs/OrderItem.md +10 -9
- package/docs/OrderPaymentMethod.md +21 -0
- package/docs/OrderTracking.md +4 -3
- package/docs/OrdersApi.md +91 -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/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* 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.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.26.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,67 +14,80 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
|
14
14
|
import type { RequestArgs } from './base';
|
|
15
15
|
import { BaseAPI } from './base';
|
|
16
16
|
/**
|
|
17
|
-
* A
|
|
17
|
+
* A postal address for shipping or billing.
|
|
18
18
|
*/
|
|
19
19
|
export interface Address {
|
|
20
|
+
/**
|
|
21
|
+
* The full name of the recipient.
|
|
22
|
+
*/
|
|
20
23
|
'contactName'?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The company name, if applicable.
|
|
26
|
+
*/
|
|
21
27
|
'company'?: string;
|
|
22
28
|
/**
|
|
23
|
-
* First line of the address.
|
|
29
|
+
* First line of the street address.
|
|
24
30
|
*/
|
|
25
31
|
'line1'?: string;
|
|
26
32
|
/**
|
|
27
|
-
* Second line of the address.
|
|
33
|
+
* Second line of the street address (apartment, suite, etc.).
|
|
28
34
|
*/
|
|
29
35
|
'line2'?: string;
|
|
30
36
|
/**
|
|
31
|
-
*
|
|
37
|
+
* The city or town.
|
|
32
38
|
*/
|
|
33
39
|
'city'?: string;
|
|
34
40
|
/**
|
|
35
|
-
*
|
|
41
|
+
* The postal or ZIP code.
|
|
36
42
|
*/
|
|
37
43
|
'postalCode'?: string;
|
|
38
44
|
/**
|
|
39
|
-
*
|
|
45
|
+
* Two-letter country code (ISO 3166-1 alpha-2).
|
|
40
46
|
*/
|
|
41
47
|
'country': string;
|
|
42
48
|
/**
|
|
43
|
-
*
|
|
49
|
+
* The state, province, or region. Required when the country is US, CA, or AU.
|
|
44
50
|
*/
|
|
45
51
|
'state'?: string;
|
|
46
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* A standard error response returned when a request fails.
|
|
55
|
+
*/
|
|
47
56
|
export interface ApiError {
|
|
57
|
+
/**
|
|
58
|
+
* A machine-readable error code.
|
|
59
|
+
*/
|
|
48
60
|
'code'?: string;
|
|
61
|
+
/**
|
|
62
|
+
* A human-readable description of what went wrong.
|
|
63
|
+
*/
|
|
49
64
|
'message': string;
|
|
50
65
|
}
|
|
51
66
|
/**
|
|
52
67
|
* @type ConfirmOrderFulfillment
|
|
68
|
+
* Confirmation details for a single fulfillment. Provide either a `shippingMethodId` to use a PodOS shipping method, or a `shipment` object with your own shipping label.
|
|
53
69
|
*/
|
|
54
70
|
export type ConfirmOrderFulfillment = ConfirmOrderFulfillmentWithShipment | ConfirmOrderFulfillmentWithShippingMethod;
|
|
71
|
+
/**
|
|
72
|
+
* Confirm a fulfillment using your own shipping label. Use this when you generate shipping labels outside of PodOS.
|
|
73
|
+
*/
|
|
55
74
|
export interface ConfirmOrderFulfillmentWithShipment {
|
|
56
75
|
/**
|
|
57
|
-
*
|
|
76
|
+
* The ID of the fulfillment to confirm.
|
|
58
77
|
*/
|
|
59
78
|
'fulfillmentId': string;
|
|
60
|
-
'shipment':
|
|
79
|
+
'shipment': Shipment;
|
|
61
80
|
}
|
|
62
81
|
/**
|
|
63
|
-
*
|
|
82
|
+
* Confirm a fulfillment using a PodOS shipping method. Choose from the `availableShippingMethods` returned on the fulfillment.
|
|
64
83
|
*/
|
|
65
|
-
export interface ConfirmOrderFulfillmentWithShipmentShipment {
|
|
66
|
-
/**
|
|
67
|
-
* Only required if you are generating shipping labels outside of PodOS
|
|
68
|
-
*/
|
|
69
|
-
'image': string;
|
|
70
|
-
}
|
|
71
84
|
export interface ConfirmOrderFulfillmentWithShippingMethod {
|
|
72
85
|
/**
|
|
73
|
-
*
|
|
86
|
+
* The ID of the fulfillment to confirm.
|
|
74
87
|
*/
|
|
75
88
|
'fulfillmentId': string;
|
|
76
89
|
/**
|
|
77
|
-
*
|
|
90
|
+
* The ID of the shipping method to use, from the fulfillment\'s `availableShippingMethods`.
|
|
78
91
|
*/
|
|
79
92
|
'shippingMethodId': string;
|
|
80
93
|
}
|
|
@@ -84,6 +97,10 @@ export interface ConfirmOrderRequest {
|
|
|
84
97
|
export interface ConfirmOrderValidationError {
|
|
85
98
|
'code': ConfirmOrderValidationErrorCodeEnum;
|
|
86
99
|
'message': string;
|
|
100
|
+
/**
|
|
101
|
+
* Present when one or more items cannot be fulfilled. Each entry describes a specific item and why it cannot be fulfilled, with a `code` that determines the error type. See `StockUnavailableError` and `ProductUnavailableError` schemas.
|
|
102
|
+
*/
|
|
103
|
+
'errors'?: Array<StockConflictError>;
|
|
87
104
|
}
|
|
88
105
|
export declare const ConfirmOrderValidationErrorCodeEnum: {
|
|
89
106
|
readonly BadRequest: "BAD_REQUEST";
|
|
@@ -96,7 +113,26 @@ export type ConfirmOrderValidationErrorCodeEnum = typeof ConfirmOrderValidationE
|
|
|
96
113
|
* Order recipient contact information, used only for courier tracking/updates.
|
|
97
114
|
*/
|
|
98
115
|
export interface ContactInformation {
|
|
116
|
+
/**
|
|
117
|
+
* Email address for delivery notifications.
|
|
118
|
+
*/
|
|
119
|
+
'email': string;
|
|
120
|
+
/**
|
|
121
|
+
* Phone number for courier contact. Include the country code.
|
|
122
|
+
*/
|
|
123
|
+
'phone'?: string | null;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Contact details for the order recipient. Used for courier delivery notifications.
|
|
127
|
+
*/
|
|
128
|
+
export interface ContactInformation1 {
|
|
129
|
+
/**
|
|
130
|
+
* Email address for delivery notifications.
|
|
131
|
+
*/
|
|
99
132
|
'email': string;
|
|
133
|
+
/**
|
|
134
|
+
* Phone number including country code. Used by couriers for delivery updates.
|
|
135
|
+
*/
|
|
100
136
|
'phone'?: string | null;
|
|
101
137
|
}
|
|
102
138
|
/**
|
|
@@ -114,47 +150,60 @@ export interface Coupon {
|
|
|
114
150
|
'ref'?: string | null;
|
|
115
151
|
}
|
|
116
152
|
/**
|
|
117
|
-
*
|
|
153
|
+
* The request body for creating a new print-on-demand order.
|
|
118
154
|
*/
|
|
119
155
|
export interface CreateOrder {
|
|
120
156
|
/**
|
|
121
|
-
*
|
|
157
|
+
* Your own reference for this order, such as an order number from your storefront. This is returned in subsequent responses and can be used for reconciliation.
|
|
122
158
|
*/
|
|
123
159
|
'merchantReference'?: string | null;
|
|
124
|
-
'contactInformation':
|
|
160
|
+
'contactInformation': ContactInformation1;
|
|
161
|
+
/**
|
|
162
|
+
* The address to ship the order to.
|
|
163
|
+
*/
|
|
125
164
|
'shippingAddress': Address;
|
|
165
|
+
/**
|
|
166
|
+
* Customs and tax registration details. Required for international shipments.
|
|
167
|
+
*/
|
|
126
168
|
'customsInformation'?: CustomsInformation;
|
|
127
169
|
/**
|
|
128
|
-
*
|
|
170
|
+
* The items to include in the order. Each item references a product variant from the Product Catalog API.
|
|
171
|
+
*/
|
|
172
|
+
'items': Array<CreateOrderItem>;
|
|
173
|
+
/**
|
|
174
|
+
* An optional list of preferred fulfiller IDs. When provided, the system will attempt to route the order to one of these fulfillers.
|
|
129
175
|
*/
|
|
130
|
-
'items': Array<OrderItem1>;
|
|
131
176
|
'preferredFulfillers'?: Array<string>;
|
|
132
177
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
'
|
|
138
|
-
|
|
178
|
+
export interface CreateOrderItem {
|
|
179
|
+
/**
|
|
180
|
+
* A reference to the variant being ordered
|
|
181
|
+
*/
|
|
182
|
+
'variantRef': string;
|
|
183
|
+
/**
|
|
184
|
+
* The number of units to order.
|
|
185
|
+
*/
|
|
186
|
+
'quantity': number;
|
|
187
|
+
'recipientCost'?: RecipientCost;
|
|
139
188
|
}
|
|
140
189
|
/**
|
|
141
190
|
* Customs information for the order. **Note:** Adding customs information to an order is only compatible with Shipmate at this time
|
|
142
191
|
*/
|
|
143
192
|
export interface CustomsInformation {
|
|
144
193
|
/**
|
|
145
|
-
*
|
|
194
|
+
* The type of tax pre-registration (e.g. IOSS for EU imports).
|
|
146
195
|
*/
|
|
147
196
|
'preRegistrationType'?: CustomsInformationPreRegistrationTypeEnum;
|
|
148
197
|
/**
|
|
149
|
-
*
|
|
198
|
+
* The pre-registration number associated with the registration type.
|
|
150
199
|
*/
|
|
151
200
|
'preRegistrationNumber'?: string;
|
|
152
201
|
/**
|
|
153
|
-
* VAT number
|
|
202
|
+
* The shipper\'s VAT registration number.
|
|
154
203
|
*/
|
|
155
204
|
'vatNumber'?: string;
|
|
156
205
|
/**
|
|
157
|
-
* EORI number
|
|
206
|
+
* The shipper\'s EORI number for customs declarations.
|
|
158
207
|
*/
|
|
159
208
|
'eoriNumber'?: string;
|
|
160
209
|
}
|
|
@@ -162,23 +211,41 @@ export declare const CustomsInformationPreRegistrationTypeEnum: {
|
|
|
162
211
|
readonly Ioss: "IOSS";
|
|
163
212
|
};
|
|
164
213
|
export type CustomsInformationPreRegistrationTypeEnum = typeof CustomsInformationPreRegistrationTypeEnum[keyof typeof CustomsInformationPreRegistrationTypeEnum];
|
|
214
|
+
/**
|
|
215
|
+
* Customs and tax registration details for international shipments.
|
|
216
|
+
*/
|
|
165
217
|
export interface CustomsInformation1 {
|
|
218
|
+
/**
|
|
219
|
+
* The type of tax pre-registration (e.g. IOSS for EU imports).
|
|
220
|
+
*/
|
|
166
221
|
'preRegistrationType'?: string;
|
|
222
|
+
/**
|
|
223
|
+
* The pre-registration number associated with the registration type.
|
|
224
|
+
*/
|
|
167
225
|
'preRegistrationNumber'?: string;
|
|
226
|
+
/**
|
|
227
|
+
* The shipper\'s VAT registration number.
|
|
228
|
+
*/
|
|
168
229
|
'vatNumber'?: string;
|
|
230
|
+
/**
|
|
231
|
+
* The shipper\'s EORI number for customs declarations.
|
|
232
|
+
*/
|
|
169
233
|
'eoriNumber'?: string;
|
|
170
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Estimated delivery window for this shipping method.
|
|
237
|
+
*/
|
|
171
238
|
export interface DeliveryEstimates {
|
|
172
239
|
/**
|
|
173
|
-
* Whether this is a priority shipping method. Fulfillments with priority methods aim for same
|
|
240
|
+
* Whether this is a priority shipping method. Fulfillments with priority methods aim for same-day dispatch when ordered before 1pm, and typically offer faster delivery times.
|
|
174
241
|
*/
|
|
175
242
|
'isPriority'?: boolean;
|
|
176
243
|
/**
|
|
177
|
-
*
|
|
244
|
+
* The earliest estimated delivery date.
|
|
178
245
|
*/
|
|
179
246
|
'min'?: string;
|
|
180
247
|
/**
|
|
181
|
-
*
|
|
248
|
+
* The latest estimated delivery date.
|
|
182
249
|
*/
|
|
183
250
|
'max'?: string;
|
|
184
251
|
}
|
|
@@ -188,73 +255,109 @@ export interface ExportOrders202Response {
|
|
|
188
255
|
*/
|
|
189
256
|
'message'?: string;
|
|
190
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* The fulfiller that will produce and ship this package.
|
|
260
|
+
*/
|
|
261
|
+
export interface Fulfiller {
|
|
262
|
+
/**
|
|
263
|
+
* Unique identifier of the fulfiller.
|
|
264
|
+
*/
|
|
265
|
+
'id'?: string;
|
|
266
|
+
'location'?: FulfillerLocation;
|
|
267
|
+
/**
|
|
268
|
+
* Whether the fulfiller has the stock and capacity to begin processing immediately.
|
|
269
|
+
*/
|
|
270
|
+
'canFulfillImmediately'?: boolean | null;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* The geographic location of the fulfiller.
|
|
274
|
+
*/
|
|
275
|
+
export interface FulfillerLocation {
|
|
276
|
+
/**
|
|
277
|
+
* The city where the fulfiller is located.
|
|
278
|
+
*/
|
|
279
|
+
'city'?: string | null;
|
|
280
|
+
/**
|
|
281
|
+
* The country code where the fulfiller is located (ISO 3166-1 alpha-2).
|
|
282
|
+
*/
|
|
283
|
+
'country'?: string | null;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* A fulfillment group within an order. Each fulfillment represents a package that will be shipped separately, potentially from a different fulfiller.
|
|
287
|
+
*/
|
|
191
288
|
export interface Fulfillment {
|
|
192
289
|
/**
|
|
193
|
-
* Unique fulfillment
|
|
290
|
+
* Unique identifier for this fulfillment.
|
|
194
291
|
*/
|
|
195
292
|
'id'?: string;
|
|
293
|
+
/**
|
|
294
|
+
* The current status of this fulfillment.
|
|
295
|
+
*/
|
|
196
296
|
'status'?: Status;
|
|
197
|
-
'fulfiller'?:
|
|
297
|
+
'fulfiller'?: Fulfiller;
|
|
298
|
+
/**
|
|
299
|
+
* The items included in this fulfillment package.
|
|
300
|
+
*/
|
|
198
301
|
'items'?: Array<FulfillmentItem>;
|
|
199
302
|
'tracking'?: OrderTracking | null;
|
|
200
303
|
/**
|
|
201
|
-
*
|
|
304
|
+
* The shipping method currently assigned to this fulfillment.
|
|
202
305
|
*/
|
|
203
306
|
'shippingMethod'?: ShippingMethod;
|
|
204
307
|
/**
|
|
205
|
-
* Shipping methods available for this fulfillment.
|
|
308
|
+
* Shipping methods available for this fulfillment. Use one of these IDs when confirming the order.
|
|
206
309
|
*/
|
|
207
310
|
'availableShippingMethods'?: Array<ShippingMethod>;
|
|
208
311
|
/**
|
|
209
|
-
*
|
|
312
|
+
* The estimated weight of the package in grams.
|
|
210
313
|
*/
|
|
211
314
|
'packageWeight'?: number;
|
|
212
315
|
/**
|
|
213
|
-
*
|
|
316
|
+
* Reference to the source platform of this fulfillment.
|
|
214
317
|
*/
|
|
215
318
|
'platformRef'?: string;
|
|
216
319
|
}
|
|
217
|
-
/**
|
|
218
|
-
* The fulfiller that will be processing this order.
|
|
219
|
-
*/
|
|
220
|
-
export interface FulfillmentFulfiller {
|
|
221
|
-
/**
|
|
222
|
-
* Unique object identifier
|
|
223
|
-
*/
|
|
224
|
-
'id'?: string;
|
|
225
|
-
'location'?: FulfillmentFulfillerLocation;
|
|
226
|
-
'canFulfillImmediately'?: boolean | null;
|
|
227
|
-
}
|
|
228
|
-
export interface FulfillmentFulfillerLocation {
|
|
229
|
-
'city'?: string | null;
|
|
230
|
-
'country'?: string | null;
|
|
231
|
-
}
|
|
232
320
|
export interface FulfillmentItem {
|
|
233
321
|
/**
|
|
234
|
-
* Unique fulfillment item
|
|
322
|
+
* Unique identifier for this fulfillment item.
|
|
235
323
|
*/
|
|
236
324
|
'id'?: string;
|
|
237
325
|
/**
|
|
238
|
-
*
|
|
326
|
+
* The ID of the order item being fulfilled.
|
|
239
327
|
*/
|
|
240
328
|
'itemId'?: string;
|
|
241
329
|
/**
|
|
242
|
-
*
|
|
330
|
+
* The number of units of this item included in the fulfillment.
|
|
243
331
|
*/
|
|
244
332
|
'quantity'?: number;
|
|
245
333
|
}
|
|
246
334
|
/**
|
|
247
|
-
*
|
|
335
|
+
* A product image associated with an order item.
|
|
248
336
|
*/
|
|
249
337
|
export interface Image {
|
|
250
338
|
/**
|
|
251
|
-
* Unique
|
|
339
|
+
* Unique identifier for this image.
|
|
252
340
|
*/
|
|
253
341
|
'id'?: string;
|
|
342
|
+
/**
|
|
343
|
+
* The URL of the image.
|
|
344
|
+
*/
|
|
254
345
|
'src'?: string;
|
|
346
|
+
/**
|
|
347
|
+
* Alternative text describing the image content.
|
|
348
|
+
*/
|
|
255
349
|
'alt'?: string;
|
|
350
|
+
/**
|
|
351
|
+
* The display order of this image relative to other images for the same item.
|
|
352
|
+
*/
|
|
256
353
|
'sortOrder'?: number;
|
|
257
354
|
}
|
|
355
|
+
export interface ImportOrders202Response {
|
|
356
|
+
/**
|
|
357
|
+
* Id of the order import
|
|
358
|
+
*/
|
|
359
|
+
'importId'?: string;
|
|
360
|
+
}
|
|
258
361
|
export interface Option {
|
|
259
362
|
/**
|
|
260
363
|
* Option name
|
|
@@ -265,6 +368,9 @@ export interface Option {
|
|
|
265
368
|
*/
|
|
266
369
|
'value': string;
|
|
267
370
|
}
|
|
371
|
+
/**
|
|
372
|
+
* Represents a print-on-demand order placed on a project. An order contains items, fulfillment details, pricing, and status tracking.
|
|
373
|
+
*/
|
|
268
374
|
export interface Order {
|
|
269
375
|
/**
|
|
270
376
|
* Unique object identifier
|
|
@@ -274,42 +380,81 @@ export interface Order {
|
|
|
274
380
|
* A reference to the resource location
|
|
275
381
|
*/
|
|
276
382
|
'ref'?: string;
|
|
383
|
+
/**
|
|
384
|
+
* The current status of the order.
|
|
385
|
+
*/
|
|
277
386
|
'status'?: Status;
|
|
278
387
|
'contactInformation': ContactInformation;
|
|
279
|
-
'paymentMethod'?:
|
|
388
|
+
'paymentMethod'?: OrderPaymentMethod;
|
|
389
|
+
/**
|
|
390
|
+
* The address the order will be shipped to.
|
|
391
|
+
*/
|
|
280
392
|
'shippingAddress': Address;
|
|
281
393
|
'customsInformation'?: CustomsInformation1;
|
|
282
394
|
/**
|
|
283
|
-
*
|
|
395
|
+
* When the order was created.
|
|
284
396
|
*/
|
|
285
397
|
'createdAt'?: string;
|
|
286
398
|
/**
|
|
287
|
-
*
|
|
399
|
+
* When the order was last updated.
|
|
288
400
|
*/
|
|
289
401
|
'updatedAt'?: string;
|
|
290
402
|
/**
|
|
291
|
-
*
|
|
403
|
+
* When the order status last changed.
|
|
292
404
|
*/
|
|
293
405
|
'statusChangedAt'?: string;
|
|
294
406
|
/**
|
|
295
|
-
*
|
|
407
|
+
* Your own reference for this order, such as an order number from your storefront.
|
|
296
408
|
*/
|
|
297
409
|
'merchantReference'?: string | null;
|
|
410
|
+
/**
|
|
411
|
+
* The fulfillment groups for this order. Each fulfillment represents a package that will be shipped separately.
|
|
412
|
+
*/
|
|
298
413
|
'fulfillments'?: Array<Fulfillment>;
|
|
414
|
+
/**
|
|
415
|
+
* The line items included in this order.
|
|
416
|
+
*/
|
|
299
417
|
'items': Array<OrderItem>;
|
|
418
|
+
/**
|
|
419
|
+
* The total price of the order including tax and after discounts.
|
|
420
|
+
*/
|
|
300
421
|
'totalPrice'?: Price;
|
|
422
|
+
/**
|
|
423
|
+
* The total tax amount for the order.
|
|
424
|
+
*/
|
|
301
425
|
'taxPrice'?: Price;
|
|
426
|
+
/**
|
|
427
|
+
* The net items price excluding tax and before discounts.
|
|
428
|
+
*/
|
|
302
429
|
'subtotalPrice'?: Price;
|
|
430
|
+
/**
|
|
431
|
+
* The total discount amount applied to the order.
|
|
432
|
+
*/
|
|
303
433
|
'discountPrice'?: Price;
|
|
434
|
+
/**
|
|
435
|
+
* The coupon applied to the order, if any.
|
|
436
|
+
*/
|
|
304
437
|
'coupon'?: Coupon | null;
|
|
438
|
+
/**
|
|
439
|
+
* The total shipping cost for the order.
|
|
440
|
+
*/
|
|
305
441
|
'shippingPrice'?: Price;
|
|
306
442
|
'origin'?: Origin;
|
|
443
|
+
/**
|
|
444
|
+
* A chronological list of status changes for this order.
|
|
445
|
+
*/
|
|
307
446
|
'statusHistory'?: Array<StatusHistoryItem>;
|
|
447
|
+
/**
|
|
448
|
+
* A list of payment attempts made for this order.
|
|
449
|
+
*/
|
|
308
450
|
'paymentAttempts'?: Array<PaymentAttempt>;
|
|
309
451
|
}
|
|
452
|
+
/**
|
|
453
|
+
* A line item in an order, representing a specific product variant and quantity.
|
|
454
|
+
*/
|
|
310
455
|
export interface OrderItem {
|
|
311
456
|
/**
|
|
312
|
-
* Unique
|
|
457
|
+
* Unique identifier for this order item.
|
|
313
458
|
*/
|
|
314
459
|
'id'?: string;
|
|
315
460
|
/**
|
|
@@ -320,42 +465,63 @@ export interface OrderItem {
|
|
|
320
465
|
* Options associated to an order item\'s variant, such as color and size.
|
|
321
466
|
*/
|
|
322
467
|
'options'?: Array<Option>;
|
|
468
|
+
/**
|
|
469
|
+
* The number of units of this variant to order.
|
|
470
|
+
*/
|
|
323
471
|
'quantity': number;
|
|
324
472
|
/**
|
|
325
|
-
* The name of the product
|
|
473
|
+
* The display name of the product.
|
|
326
474
|
*/
|
|
327
475
|
'name'?: string;
|
|
328
476
|
/**
|
|
329
|
-
*
|
|
477
|
+
* Product images associated with this item.
|
|
330
478
|
*/
|
|
331
479
|
'images'?: Array<Image>;
|
|
480
|
+
/**
|
|
481
|
+
* The total price for this line item including tax and after discounts.
|
|
482
|
+
*/
|
|
332
483
|
'totalPrice'?: Price;
|
|
333
484
|
/**
|
|
334
|
-
* This is an estimate until the order has been confirmed
|
|
485
|
+
* The tax amount for this line item. This is an estimate until the order has been confirmed.
|
|
335
486
|
*/
|
|
336
487
|
'taxPrice'?: Price;
|
|
488
|
+
/**
|
|
489
|
+
* The net price for this line item, excluding tax and before discounts.
|
|
490
|
+
*/
|
|
337
491
|
'subtotalPrice'?: Price;
|
|
492
|
+
/**
|
|
493
|
+
* The discount amount applied to this line item.
|
|
494
|
+
*/
|
|
338
495
|
'discountPrice'?: Price;
|
|
339
496
|
/**
|
|
340
|
-
* The price you charged the recipient for each item.
|
|
497
|
+
* The price you charged the recipient for each item. Highly recommended for international orders as it aids customs declarations.
|
|
341
498
|
*/
|
|
342
499
|
'recipientCost'?: Price;
|
|
343
500
|
}
|
|
344
|
-
|
|
501
|
+
/**
|
|
502
|
+
* The payment method used for this order.
|
|
503
|
+
*/
|
|
504
|
+
export interface OrderPaymentMethod {
|
|
345
505
|
/**
|
|
346
|
-
*
|
|
506
|
+
* The type of payment method used.
|
|
347
507
|
*/
|
|
348
|
-
'
|
|
349
|
-
'quantity': number;
|
|
350
|
-
'recipientCost'?: OrderItem1RecipientCost;
|
|
351
|
-
}
|
|
352
|
-
export interface OrderItem1RecipientCost {
|
|
353
|
-
'amount': string;
|
|
354
|
-
'currencyCode': string;
|
|
508
|
+
'type'?: string | null;
|
|
355
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* Shipment tracking information. Available once the fulfillment has been dispatched.
|
|
512
|
+
*/
|
|
356
513
|
export interface OrderTracking {
|
|
514
|
+
/**
|
|
515
|
+
* The name of the courier service.
|
|
516
|
+
*/
|
|
357
517
|
'courier'?: string;
|
|
518
|
+
/**
|
|
519
|
+
* The tracking code provided by the courier.
|
|
520
|
+
*/
|
|
358
521
|
'code'?: string;
|
|
522
|
+
/**
|
|
523
|
+
* A URL to track the shipment on the courier\'s website.
|
|
524
|
+
*/
|
|
359
525
|
'url'?: string;
|
|
360
526
|
}
|
|
361
527
|
export interface OrdersResponse {
|
|
@@ -365,17 +531,35 @@ export interface OrdersResponse {
|
|
|
365
531
|
*/
|
|
366
532
|
'nextPageToken'?: number | null;
|
|
367
533
|
}
|
|
534
|
+
/**
|
|
535
|
+
* The marketing or acquisition source of the order, such as `facebook_cpc`, `google_cpc`, or `organic`.
|
|
536
|
+
*/
|
|
368
537
|
export interface Origin {
|
|
538
|
+
/**
|
|
539
|
+
* A short identifier for the acquisition source, such as `facebook_cpc`, `google_cpc`, `instagram_cpc`, or `organic`.
|
|
540
|
+
*/
|
|
369
541
|
'code'?: string;
|
|
542
|
+
/**
|
|
543
|
+
* Whether this origin represents paid advertising traffic.
|
|
544
|
+
*/
|
|
370
545
|
'isPaid'?: boolean;
|
|
371
546
|
}
|
|
372
|
-
/**
|
|
373
|
-
* List of payment attempts for this order
|
|
374
|
-
*/
|
|
375
547
|
export interface PaymentAttempt {
|
|
548
|
+
/**
|
|
549
|
+
* The payment provider used.
|
|
550
|
+
*/
|
|
376
551
|
'paymentProvider'?: PaymentAttemptPaymentProviderEnum;
|
|
552
|
+
/**
|
|
553
|
+
* The outcome of the payment attempt.
|
|
554
|
+
*/
|
|
377
555
|
'status'?: PaymentAttemptStatusEnum;
|
|
556
|
+
/**
|
|
557
|
+
* The transaction ID from the payment provider.
|
|
558
|
+
*/
|
|
378
559
|
'transactionId'?: string | null;
|
|
560
|
+
/**
|
|
561
|
+
* A human-readable message describing the payment result.
|
|
562
|
+
*/
|
|
379
563
|
'message'?: string;
|
|
380
564
|
/**
|
|
381
565
|
* ISO 8601 Timestamp
|
|
@@ -395,35 +579,120 @@ export declare const PaymentAttemptStatusEnum: {
|
|
|
395
579
|
readonly Cancelled: "cancelled";
|
|
396
580
|
};
|
|
397
581
|
export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
|
|
398
|
-
export interface PaymentMethod {
|
|
399
|
-
'type'?: string | null;
|
|
400
|
-
}
|
|
401
582
|
/**
|
|
402
|
-
*
|
|
583
|
+
* A monetary value with its currency.
|
|
403
584
|
*/
|
|
404
585
|
export interface Price {
|
|
405
586
|
/**
|
|
406
|
-
*
|
|
587
|
+
* The monetary amount as a decimal string.
|
|
407
588
|
*/
|
|
408
589
|
'amount'?: string;
|
|
409
590
|
/**
|
|
410
|
-
*
|
|
591
|
+
* ISO 4217 currency code.
|
|
411
592
|
*/
|
|
412
593
|
'currencyCode'?: string;
|
|
413
594
|
}
|
|
414
|
-
|
|
595
|
+
/**
|
|
596
|
+
* 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).
|
|
597
|
+
*/
|
|
598
|
+
export interface ProductUnavailableError {
|
|
599
|
+
'code': ProductUnavailableErrorCodeEnum;
|
|
600
|
+
/**
|
|
601
|
+
* Human-readable description including the product name.
|
|
602
|
+
*/
|
|
603
|
+
'message': string;
|
|
604
|
+
/**
|
|
605
|
+
* Display name of the product.
|
|
606
|
+
*/
|
|
607
|
+
'productTitle': string;
|
|
415
608
|
/**
|
|
416
609
|
* Unique object identifier
|
|
417
610
|
*/
|
|
611
|
+
'variantId': string;
|
|
612
|
+
/**
|
|
613
|
+
* A reference to the variant being ordered
|
|
614
|
+
*/
|
|
615
|
+
'variantRef': string;
|
|
616
|
+
/**
|
|
617
|
+
* The quantity that was requested in the order.
|
|
618
|
+
*/
|
|
619
|
+
'requestedQuantity': number;
|
|
620
|
+
/**
|
|
621
|
+
* Always 0 for this error type.
|
|
622
|
+
*/
|
|
623
|
+
'availableQuantity': ProductUnavailableErrorAvailableQuantityEnum;
|
|
624
|
+
/**
|
|
625
|
+
* The full requested quantity, representing the total unfulfillable amount.
|
|
626
|
+
*/
|
|
627
|
+
'shortage': number;
|
|
628
|
+
}
|
|
629
|
+
export declare const ProductUnavailableErrorCodeEnum: {
|
|
630
|
+
readonly ProductUnavailable: "PRODUCT_UNAVAILABLE";
|
|
631
|
+
};
|
|
632
|
+
export type ProductUnavailableErrorCodeEnum = typeof ProductUnavailableErrorCodeEnum[keyof typeof ProductUnavailableErrorCodeEnum];
|
|
633
|
+
export declare const ProductUnavailableErrorAvailableQuantityEnum: {
|
|
634
|
+
readonly NUMBER_0: 0;
|
|
635
|
+
};
|
|
636
|
+
export type ProductUnavailableErrorAvailableQuantityEnum = typeof ProductUnavailableErrorAvailableQuantityEnum[keyof typeof ProductUnavailableErrorAvailableQuantityEnum];
|
|
637
|
+
/**
|
|
638
|
+
* The price you charged the end customer for this item. Highly recommended for international orders as it is used for customs declarations.
|
|
639
|
+
*/
|
|
640
|
+
export interface RecipientCost {
|
|
641
|
+
/**
|
|
642
|
+
* The monetary amount as a decimal string.
|
|
643
|
+
*/
|
|
644
|
+
'amount': string;
|
|
645
|
+
/**
|
|
646
|
+
* ISO 4217 currency code.
|
|
647
|
+
*/
|
|
648
|
+
'currencyCode': string;
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Your own shipping label details.
|
|
652
|
+
*/
|
|
653
|
+
export interface Shipment {
|
|
654
|
+
/**
|
|
655
|
+
* A URL to the shipping label image or PDF.
|
|
656
|
+
*/
|
|
657
|
+
'image': string;
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* A shipping option available for a fulfillment, including delivery estimates and pricing.
|
|
661
|
+
*/
|
|
662
|
+
export interface ShippingMethod {
|
|
663
|
+
/**
|
|
664
|
+
* Unique identifier for this shipping method. Use this when confirming a fulfillment.
|
|
665
|
+
*/
|
|
418
666
|
'id'?: string;
|
|
667
|
+
/**
|
|
668
|
+
* The display name of the shipping method.
|
|
669
|
+
*/
|
|
419
670
|
'name'?: string;
|
|
671
|
+
/**
|
|
672
|
+
* A brief description of the shipping method\'s service level.
|
|
673
|
+
*/
|
|
420
674
|
'description'?: string;
|
|
421
675
|
'deliveryEstimates'?: DeliveryEstimates;
|
|
676
|
+
/**
|
|
677
|
+
* The total shipping cost including tax.
|
|
678
|
+
*/
|
|
422
679
|
'totalPrice'?: Price;
|
|
680
|
+
/**
|
|
681
|
+
* The tax portion of the shipping cost.
|
|
682
|
+
*/
|
|
423
683
|
'taxPrice'?: Price;
|
|
684
|
+
/**
|
|
685
|
+
* The net shipping cost, excluding tax and before discounts.
|
|
686
|
+
*/
|
|
424
687
|
'subtotalPrice'?: Price;
|
|
688
|
+
/**
|
|
689
|
+
* Any discount applied to the shipping cost.
|
|
690
|
+
*/
|
|
425
691
|
'discountPrice'?: Price;
|
|
426
692
|
}
|
|
693
|
+
/**
|
|
694
|
+
* 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
|
|
695
|
+
*/
|
|
427
696
|
export declare const Status: {
|
|
428
697
|
readonly New: "new";
|
|
429
698
|
readonly Paid: "paid";
|
|
@@ -441,6 +710,52 @@ export interface StatusHistoryItem {
|
|
|
441
710
|
*/
|
|
442
711
|
'createdAt'?: string;
|
|
443
712
|
}
|
|
713
|
+
/**
|
|
714
|
+
* @type StockConflictError
|
|
715
|
+
*/
|
|
716
|
+
export type StockConflictError = {
|
|
717
|
+
code: 'PRODUCT_UNAVAILABLE';
|
|
718
|
+
} & ProductUnavailableError | {
|
|
719
|
+
code: 'STOCK_UNAVAILABLE';
|
|
720
|
+
} & StockUnavailableError;
|
|
721
|
+
/**
|
|
722
|
+
* The requested quantity exceeds available stock. The item can still be ordered in a smaller quantity.
|
|
723
|
+
*/
|
|
724
|
+
export interface StockUnavailableError {
|
|
725
|
+
'code': StockUnavailableErrorCodeEnum;
|
|
726
|
+
/**
|
|
727
|
+
* Human-readable description including the product name and available quantity.
|
|
728
|
+
*/
|
|
729
|
+
'message': string;
|
|
730
|
+
/**
|
|
731
|
+
* Display name of the product.
|
|
732
|
+
*/
|
|
733
|
+
'productTitle': string;
|
|
734
|
+
/**
|
|
735
|
+
* Unique object identifier
|
|
736
|
+
*/
|
|
737
|
+
'variantId': string;
|
|
738
|
+
/**
|
|
739
|
+
* A reference to the variant being ordered
|
|
740
|
+
*/
|
|
741
|
+
'variantRef': string;
|
|
742
|
+
/**
|
|
743
|
+
* The quantity that was requested in the order.
|
|
744
|
+
*/
|
|
745
|
+
'requestedQuantity': number;
|
|
746
|
+
/**
|
|
747
|
+
* The quantity currently available for fulfillment.
|
|
748
|
+
*/
|
|
749
|
+
'availableQuantity': number;
|
|
750
|
+
/**
|
|
751
|
+
* The difference between requested and available quantity (positive value indicating the deficit).
|
|
752
|
+
*/
|
|
753
|
+
'shortage': number;
|
|
754
|
+
}
|
|
755
|
+
export declare const StockUnavailableErrorCodeEnum: {
|
|
756
|
+
readonly StockUnavailable: "STOCK_UNAVAILABLE";
|
|
757
|
+
};
|
|
758
|
+
export type StockUnavailableErrorCodeEnum = typeof StockUnavailableErrorCodeEnum[keyof typeof StockUnavailableErrorCodeEnum];
|
|
444
759
|
/**
|
|
445
760
|
* OrdersApi - axios parameter creator
|
|
446
761
|
*/
|
|
@@ -448,7 +763,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
448
763
|
/**
|
|
449
764
|
* Cancels an order if it has not yet started processing.
|
|
450
765
|
* @summary Cancel order
|
|
451
|
-
* @param {string} project
|
|
766
|
+
* @param {string} project The project identifier to scope the request to.
|
|
452
767
|
* @param {string} orderId Unique identifier of an order
|
|
453
768
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
454
769
|
* @param {*} [options] Override http request option.
|
|
@@ -458,9 +773,9 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
458
773
|
/**
|
|
459
774
|
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
460
775
|
* @summary Confirm order
|
|
461
|
-
* @param {string} project
|
|
776
|
+
* @param {string} project The project identifier to scope the request to.
|
|
462
777
|
* @param {string} orderId Unique identifier of an order
|
|
463
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest
|
|
778
|
+
* @param {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.
|
|
464
779
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
465
780
|
* @param {*} [options] Override http request option.
|
|
466
781
|
* @throws {RequiredError}
|
|
@@ -469,7 +784,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
469
784
|
/**
|
|
470
785
|
* Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
|
|
471
786
|
* @summary Create order
|
|
472
|
-
* @param {string} project
|
|
787
|
+
* @param {string} project The project identifier to scope the request to.
|
|
473
788
|
* @param {CreateOrder} createOrder Create Order schema
|
|
474
789
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
475
790
|
* @param {*} [options] Override http request option.
|
|
@@ -479,7 +794,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
479
794
|
/**
|
|
480
795
|
* Download an order invoice.
|
|
481
796
|
* @summary Download order invoice
|
|
482
|
-
* @param {string} project
|
|
797
|
+
* @param {string} project The project identifier to scope the request to.
|
|
483
798
|
* @param {string} orderId Unique identifier of an order
|
|
484
799
|
* @param {*} [options] Override http request option.
|
|
485
800
|
* @throws {RequiredError}
|
|
@@ -488,9 +803,9 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
488
803
|
/**
|
|
489
804
|
* Export orders as a CSV file
|
|
490
805
|
* @summary Export orders
|
|
491
|
-
* @param {string} project
|
|
492
|
-
* @param {string} start Start of date range to filter by when orders were placed
|
|
493
|
-
* @param {string} [end] End of date range
|
|
806
|
+
* @param {string} project The project identifier to scope the request to.
|
|
807
|
+
* @param {string} start Start of the date range to filter by when orders were placed.
|
|
808
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
494
809
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
495
810
|
* @param {*} [options] Override http request option.
|
|
496
811
|
* @throws {RequiredError}
|
|
@@ -499,7 +814,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
499
814
|
/**
|
|
500
815
|
* Get an order by a given ID.
|
|
501
816
|
* @summary Get order
|
|
502
|
-
* @param {string} project
|
|
817
|
+
* @param {string} project The project identifier to scope the request to.
|
|
503
818
|
* @param {string} orderId Unique identifier of an order
|
|
504
819
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
505
820
|
* @param {*} [options] Override http request option.
|
|
@@ -509,24 +824,33 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
509
824
|
/**
|
|
510
825
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
511
826
|
* @summary List orders
|
|
512
|
-
* @param {string} project
|
|
827
|
+
* @param {string} project The project identifier to scope the request to.
|
|
513
828
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
514
829
|
* @param {number} [pageToken] Page reference token
|
|
515
830
|
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
516
831
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
517
|
-
* @param {Array<string>} [ids]
|
|
518
|
-
* @param {Array<Status>} [statuses] Filter by
|
|
519
|
-
* @param {string} [start] Start of date range
|
|
520
|
-
* @param {string} [end] End of date range
|
|
832
|
+
* @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
|
|
833
|
+
* @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
|
|
834
|
+
* @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
835
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
521
836
|
* @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query.
|
|
522
837
|
* @param {*} [options] Override http request option.
|
|
523
838
|
* @throws {RequiredError}
|
|
524
839
|
*/
|
|
525
840
|
getOrders: (project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: string, end?: string, dateFilterType?: GetOrdersDateFilterTypeEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
841
|
+
/**
|
|
842
|
+
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
843
|
+
* @summary Import orders
|
|
844
|
+
* @param {string} project The project identifier to scope the request to.
|
|
845
|
+
* @param {File} file CSV file containing order data
|
|
846
|
+
* @param {*} [options] Override http request option.
|
|
847
|
+
* @throws {RequiredError}
|
|
848
|
+
*/
|
|
849
|
+
importOrders: (project: string, file: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
526
850
|
/**
|
|
527
851
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
528
852
|
* @summary Retry
|
|
529
|
-
* @param {string} project
|
|
853
|
+
* @param {string} project The project identifier to scope the request to.
|
|
530
854
|
* @param {string} orderId Unique identifier of an order
|
|
531
855
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
532
856
|
* @param {*} [options] Override http request option.
|
|
@@ -541,7 +865,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
541
865
|
/**
|
|
542
866
|
* Cancels an order if it has not yet started processing.
|
|
543
867
|
* @summary Cancel order
|
|
544
|
-
* @param {string} project
|
|
868
|
+
* @param {string} project The project identifier to scope the request to.
|
|
545
869
|
* @param {string} orderId Unique identifier of an order
|
|
546
870
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
547
871
|
* @param {*} [options] Override http request option.
|
|
@@ -551,9 +875,9 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
551
875
|
/**
|
|
552
876
|
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
553
877
|
* @summary Confirm order
|
|
554
|
-
* @param {string} project
|
|
878
|
+
* @param {string} project The project identifier to scope the request to.
|
|
555
879
|
* @param {string} orderId Unique identifier of an order
|
|
556
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest
|
|
880
|
+
* @param {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.
|
|
557
881
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
558
882
|
* @param {*} [options] Override http request option.
|
|
559
883
|
* @throws {RequiredError}
|
|
@@ -562,7 +886,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
562
886
|
/**
|
|
563
887
|
* Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
|
|
564
888
|
* @summary Create order
|
|
565
|
-
* @param {string} project
|
|
889
|
+
* @param {string} project The project identifier to scope the request to.
|
|
566
890
|
* @param {CreateOrder} createOrder Create Order schema
|
|
567
891
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
568
892
|
* @param {*} [options] Override http request option.
|
|
@@ -572,7 +896,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
572
896
|
/**
|
|
573
897
|
* Download an order invoice.
|
|
574
898
|
* @summary Download order invoice
|
|
575
|
-
* @param {string} project
|
|
899
|
+
* @param {string} project The project identifier to scope the request to.
|
|
576
900
|
* @param {string} orderId Unique identifier of an order
|
|
577
901
|
* @param {*} [options] Override http request option.
|
|
578
902
|
* @throws {RequiredError}
|
|
@@ -581,9 +905,9 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
581
905
|
/**
|
|
582
906
|
* Export orders as a CSV file
|
|
583
907
|
* @summary Export orders
|
|
584
|
-
* @param {string} project
|
|
585
|
-
* @param {string} start Start of date range to filter by when orders were placed
|
|
586
|
-
* @param {string} [end] End of date range
|
|
908
|
+
* @param {string} project The project identifier to scope the request to.
|
|
909
|
+
* @param {string} start Start of the date range to filter by when orders were placed.
|
|
910
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
587
911
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
588
912
|
* @param {*} [options] Override http request option.
|
|
589
913
|
* @throws {RequiredError}
|
|
@@ -592,7 +916,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
592
916
|
/**
|
|
593
917
|
* Get an order by a given ID.
|
|
594
918
|
* @summary Get order
|
|
595
|
-
* @param {string} project
|
|
919
|
+
* @param {string} project The project identifier to scope the request to.
|
|
596
920
|
* @param {string} orderId Unique identifier of an order
|
|
597
921
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
598
922
|
* @param {*} [options] Override http request option.
|
|
@@ -602,24 +926,33 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
602
926
|
/**
|
|
603
927
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
604
928
|
* @summary List orders
|
|
605
|
-
* @param {string} project
|
|
929
|
+
* @param {string} project The project identifier to scope the request to.
|
|
606
930
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
607
931
|
* @param {number} [pageToken] Page reference token
|
|
608
932
|
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
609
933
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
610
|
-
* @param {Array<string>} [ids]
|
|
611
|
-
* @param {Array<Status>} [statuses] Filter by
|
|
612
|
-
* @param {string} [start] Start of date range
|
|
613
|
-
* @param {string} [end] End of date range
|
|
934
|
+
* @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
|
|
935
|
+
* @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
|
|
936
|
+
* @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
937
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
614
938
|
* @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query.
|
|
615
939
|
* @param {*} [options] Override http request option.
|
|
616
940
|
* @throws {RequiredError}
|
|
617
941
|
*/
|
|
618
942
|
getOrders(project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: string, end?: string, dateFilterType?: GetOrdersDateFilterTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrdersResponse>>;
|
|
943
|
+
/**
|
|
944
|
+
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
945
|
+
* @summary Import orders
|
|
946
|
+
* @param {string} project The project identifier to scope the request to.
|
|
947
|
+
* @param {File} file CSV file containing order data
|
|
948
|
+
* @param {*} [options] Override http request option.
|
|
949
|
+
* @throws {RequiredError}
|
|
950
|
+
*/
|
|
951
|
+
importOrders(project: string, file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportOrders202Response>>;
|
|
619
952
|
/**
|
|
620
953
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
621
954
|
* @summary Retry
|
|
622
|
-
* @param {string} project
|
|
955
|
+
* @param {string} project The project identifier to scope the request to.
|
|
623
956
|
* @param {string} orderId Unique identifier of an order
|
|
624
957
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
625
958
|
* @param {*} [options] Override http request option.
|
|
@@ -687,6 +1020,14 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
|
|
|
687
1020
|
* @throws {RequiredError}
|
|
688
1021
|
*/
|
|
689
1022
|
getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse>;
|
|
1023
|
+
/**
|
|
1024
|
+
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
1025
|
+
* @summary Import orders
|
|
1026
|
+
* @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
|
|
1027
|
+
* @param {*} [options] Override http request option.
|
|
1028
|
+
* @throws {RequiredError}
|
|
1029
|
+
*/
|
|
1030
|
+
importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportOrders202Response>;
|
|
690
1031
|
/**
|
|
691
1032
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
692
1033
|
* @summary Retry
|
|
@@ -701,7 +1042,7 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
|
|
|
701
1042
|
*/
|
|
702
1043
|
export interface OrdersApiCancelOrderRequest {
|
|
703
1044
|
/**
|
|
704
|
-
*
|
|
1045
|
+
* The project identifier to scope the request to.
|
|
705
1046
|
*/
|
|
706
1047
|
readonly project: string;
|
|
707
1048
|
/**
|
|
@@ -718,7 +1059,7 @@ export interface OrdersApiCancelOrderRequest {
|
|
|
718
1059
|
*/
|
|
719
1060
|
export interface OrdersApiConfirmOrderRequest {
|
|
720
1061
|
/**
|
|
721
|
-
*
|
|
1062
|
+
* The project identifier to scope the request to.
|
|
722
1063
|
*/
|
|
723
1064
|
readonly project: string;
|
|
724
1065
|
/**
|
|
@@ -726,7 +1067,7 @@ export interface OrdersApiConfirmOrderRequest {
|
|
|
726
1067
|
*/
|
|
727
1068
|
readonly orderId: string;
|
|
728
1069
|
/**
|
|
729
|
-
*
|
|
1070
|
+
* 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.
|
|
730
1071
|
*/
|
|
731
1072
|
readonly confirmOrderRequest: ConfirmOrderRequest;
|
|
732
1073
|
/**
|
|
@@ -739,7 +1080,7 @@ export interface OrdersApiConfirmOrderRequest {
|
|
|
739
1080
|
*/
|
|
740
1081
|
export interface OrdersApiCreateOrderRequest {
|
|
741
1082
|
/**
|
|
742
|
-
*
|
|
1083
|
+
* The project identifier to scope the request to.
|
|
743
1084
|
*/
|
|
744
1085
|
readonly project: string;
|
|
745
1086
|
/**
|
|
@@ -756,7 +1097,7 @@ export interface OrdersApiCreateOrderRequest {
|
|
|
756
1097
|
*/
|
|
757
1098
|
export interface OrdersApiDownloadInvoiceRequest {
|
|
758
1099
|
/**
|
|
759
|
-
*
|
|
1100
|
+
* The project identifier to scope the request to.
|
|
760
1101
|
*/
|
|
761
1102
|
readonly project: string;
|
|
762
1103
|
/**
|
|
@@ -769,15 +1110,15 @@ export interface OrdersApiDownloadInvoiceRequest {
|
|
|
769
1110
|
*/
|
|
770
1111
|
export interface OrdersApiExportOrdersRequest {
|
|
771
1112
|
/**
|
|
772
|
-
*
|
|
1113
|
+
* The project identifier to scope the request to.
|
|
773
1114
|
*/
|
|
774
1115
|
readonly project: string;
|
|
775
1116
|
/**
|
|
776
|
-
* Start of date range to filter by when orders were placed
|
|
1117
|
+
* Start of the date range to filter by when orders were placed.
|
|
777
1118
|
*/
|
|
778
1119
|
readonly start: string;
|
|
779
1120
|
/**
|
|
780
|
-
* End of date range
|
|
1121
|
+
* End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
781
1122
|
*/
|
|
782
1123
|
readonly end?: string;
|
|
783
1124
|
/**
|
|
@@ -790,7 +1131,7 @@ export interface OrdersApiExportOrdersRequest {
|
|
|
790
1131
|
*/
|
|
791
1132
|
export interface OrdersApiGetOrderRequest {
|
|
792
1133
|
/**
|
|
793
|
-
*
|
|
1134
|
+
* The project identifier to scope the request to.
|
|
794
1135
|
*/
|
|
795
1136
|
readonly project: string;
|
|
796
1137
|
/**
|
|
@@ -807,7 +1148,7 @@ export interface OrdersApiGetOrderRequest {
|
|
|
807
1148
|
*/
|
|
808
1149
|
export interface OrdersApiGetOrdersRequest {
|
|
809
1150
|
/**
|
|
810
|
-
*
|
|
1151
|
+
* The project identifier to scope the request to.
|
|
811
1152
|
*/
|
|
812
1153
|
readonly project: string;
|
|
813
1154
|
/**
|
|
@@ -827,19 +1168,19 @@ export interface OrdersApiGetOrdersRequest {
|
|
|
827
1168
|
*/
|
|
828
1169
|
readonly search?: string;
|
|
829
1170
|
/**
|
|
830
|
-
*
|
|
1171
|
+
* Filter to specific order IDs. Only orders matching these IDs will be returned.
|
|
831
1172
|
*/
|
|
832
1173
|
readonly ids?: Array<string>;
|
|
833
1174
|
/**
|
|
834
|
-
* Filter by
|
|
1175
|
+
* Filter by order status. Only orders matching one of the given statuses will be returned.
|
|
835
1176
|
*/
|
|
836
1177
|
readonly statuses?: Array<Status>;
|
|
837
1178
|
/**
|
|
838
|
-
* Start of date range
|
|
1179
|
+
* Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
839
1180
|
*/
|
|
840
1181
|
readonly start?: string;
|
|
841
1182
|
/**
|
|
842
|
-
* End of date range
|
|
1183
|
+
* End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
843
1184
|
*/
|
|
844
1185
|
readonly end?: string;
|
|
845
1186
|
/**
|
|
@@ -847,12 +1188,25 @@ export interface OrdersApiGetOrdersRequest {
|
|
|
847
1188
|
*/
|
|
848
1189
|
readonly dateFilterType?: GetOrdersDateFilterTypeEnum;
|
|
849
1190
|
}
|
|
1191
|
+
/**
|
|
1192
|
+
* Request parameters for importOrders operation in OrdersApi.
|
|
1193
|
+
*/
|
|
1194
|
+
export interface OrdersApiImportOrdersRequest {
|
|
1195
|
+
/**
|
|
1196
|
+
* The project identifier to scope the request to.
|
|
1197
|
+
*/
|
|
1198
|
+
readonly project: string;
|
|
1199
|
+
/**
|
|
1200
|
+
* CSV file containing order data
|
|
1201
|
+
*/
|
|
1202
|
+
readonly file: File;
|
|
1203
|
+
}
|
|
850
1204
|
/**
|
|
851
1205
|
* Request parameters for retryPlatformPayment operation in OrdersApi.
|
|
852
1206
|
*/
|
|
853
1207
|
export interface OrdersApiRetryPlatformPaymentRequest {
|
|
854
1208
|
/**
|
|
855
|
-
*
|
|
1209
|
+
* The project identifier to scope the request to.
|
|
856
1210
|
*/
|
|
857
1211
|
readonly project: string;
|
|
858
1212
|
/**
|
|
@@ -924,6 +1278,14 @@ export declare class OrdersApi extends BaseAPI {
|
|
|
924
1278
|
* @throws {RequiredError}
|
|
925
1279
|
*/
|
|
926
1280
|
getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrdersResponse, any, {}>>;
|
|
1281
|
+
/**
|
|
1282
|
+
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
1283
|
+
* @summary Import orders
|
|
1284
|
+
* @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
|
|
1285
|
+
* @param {*} [options] Override http request option.
|
|
1286
|
+
* @throws {RequiredError}
|
|
1287
|
+
*/
|
|
1288
|
+
importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ImportOrders202Response, any, {}>>;
|
|
927
1289
|
/**
|
|
928
1290
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
929
1291
|
* @summary Retry
|