@teemill/orders 1.24.0 → 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 +457 -146
- 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 +52 -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 +51 -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 +2 -2
package/api.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).
|
|
@@ -18,74 +18,87 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
|
18
18
|
import globalAxios from 'axios';
|
|
19
19
|
// Some imports not used depending on template conditions
|
|
20
20
|
// @ts-ignore
|
|
21
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from './common';
|
|
22
22
|
import type { RequestArgs } from './base';
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* A
|
|
27
|
+
* A postal address for shipping or billing.
|
|
28
28
|
*/
|
|
29
29
|
export interface Address {
|
|
30
|
+
/**
|
|
31
|
+
* The full name of the recipient.
|
|
32
|
+
*/
|
|
30
33
|
'contactName'?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The company name, if applicable.
|
|
36
|
+
*/
|
|
31
37
|
'company'?: string;
|
|
32
38
|
/**
|
|
33
|
-
* First line of the address.
|
|
39
|
+
* First line of the street address.
|
|
34
40
|
*/
|
|
35
41
|
'line1'?: string;
|
|
36
42
|
/**
|
|
37
|
-
* Second line of the address.
|
|
43
|
+
* Second line of the street address (apartment, suite, etc.).
|
|
38
44
|
*/
|
|
39
45
|
'line2'?: string;
|
|
40
46
|
/**
|
|
41
|
-
*
|
|
47
|
+
* The city or town.
|
|
42
48
|
*/
|
|
43
49
|
'city'?: string;
|
|
44
50
|
/**
|
|
45
|
-
*
|
|
51
|
+
* The postal or ZIP code.
|
|
46
52
|
*/
|
|
47
53
|
'postalCode'?: string;
|
|
48
54
|
/**
|
|
49
|
-
*
|
|
55
|
+
* Two-letter country code (ISO 3166-1 alpha-2).
|
|
50
56
|
*/
|
|
51
57
|
'country': string;
|
|
52
58
|
/**
|
|
53
|
-
*
|
|
59
|
+
* The state, province, or region. Required when the country is US, CA, or AU.
|
|
54
60
|
*/
|
|
55
61
|
'state'?: string;
|
|
56
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* A standard error response returned when a request fails.
|
|
65
|
+
*/
|
|
57
66
|
export interface ApiError {
|
|
67
|
+
/**
|
|
68
|
+
* A machine-readable error code.
|
|
69
|
+
*/
|
|
58
70
|
'code'?: string;
|
|
71
|
+
/**
|
|
72
|
+
* A human-readable description of what went wrong.
|
|
73
|
+
*/
|
|
59
74
|
'message': string;
|
|
60
75
|
}
|
|
61
76
|
/**
|
|
62
77
|
* @type ConfirmOrderFulfillment
|
|
78
|
+
* 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.
|
|
63
79
|
*/
|
|
64
80
|
export type ConfirmOrderFulfillment = ConfirmOrderFulfillmentWithShipment | ConfirmOrderFulfillmentWithShippingMethod;
|
|
65
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Confirm a fulfillment using your own shipping label. Use this when you generate shipping labels outside of PodOS.
|
|
84
|
+
*/
|
|
66
85
|
export interface ConfirmOrderFulfillmentWithShipment {
|
|
67
86
|
/**
|
|
68
|
-
*
|
|
87
|
+
* The ID of the fulfillment to confirm.
|
|
69
88
|
*/
|
|
70
89
|
'fulfillmentId': string;
|
|
71
|
-
'shipment':
|
|
90
|
+
'shipment': Shipment;
|
|
72
91
|
}
|
|
73
92
|
/**
|
|
74
|
-
*
|
|
93
|
+
* Confirm a fulfillment using a PodOS shipping method. Choose from the `availableShippingMethods` returned on the fulfillment.
|
|
75
94
|
*/
|
|
76
|
-
export interface ConfirmOrderFulfillmentWithShipmentShipment {
|
|
77
|
-
/**
|
|
78
|
-
* Only required if you are generating shipping labels outside of PodOS
|
|
79
|
-
*/
|
|
80
|
-
'image': string;
|
|
81
|
-
}
|
|
82
95
|
export interface ConfirmOrderFulfillmentWithShippingMethod {
|
|
83
96
|
/**
|
|
84
|
-
*
|
|
97
|
+
* The ID of the fulfillment to confirm.
|
|
85
98
|
*/
|
|
86
99
|
'fulfillmentId': string;
|
|
87
100
|
/**
|
|
88
|
-
*
|
|
101
|
+
* The ID of the shipping method to use, from the fulfillment\'s `availableShippingMethods`.
|
|
89
102
|
*/
|
|
90
103
|
'shippingMethodId': string;
|
|
91
104
|
}
|
|
@@ -95,6 +108,10 @@ export interface ConfirmOrderRequest {
|
|
|
95
108
|
export interface ConfirmOrderValidationError {
|
|
96
109
|
'code': ConfirmOrderValidationErrorCodeEnum;
|
|
97
110
|
'message': string;
|
|
111
|
+
/**
|
|
112
|
+
* 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.
|
|
113
|
+
*/
|
|
114
|
+
'errors'?: Array<StockConflictError>;
|
|
98
115
|
}
|
|
99
116
|
|
|
100
117
|
export const ConfirmOrderValidationErrorCodeEnum = {
|
|
@@ -110,7 +127,26 @@ export type ConfirmOrderValidationErrorCodeEnum = typeof ConfirmOrderValidationE
|
|
|
110
127
|
* Order recipient contact information, used only for courier tracking/updates.
|
|
111
128
|
*/
|
|
112
129
|
export interface ContactInformation {
|
|
130
|
+
/**
|
|
131
|
+
* Email address for delivery notifications.
|
|
132
|
+
*/
|
|
113
133
|
'email': string;
|
|
134
|
+
/**
|
|
135
|
+
* Phone number for courier contact. Include the country code.
|
|
136
|
+
*/
|
|
137
|
+
'phone'?: string | null;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Contact details for the order recipient. Used for courier delivery notifications.
|
|
141
|
+
*/
|
|
142
|
+
export interface ContactInformation1 {
|
|
143
|
+
/**
|
|
144
|
+
* Email address for delivery notifications.
|
|
145
|
+
*/
|
|
146
|
+
'email': string;
|
|
147
|
+
/**
|
|
148
|
+
* Phone number including country code. Used by couriers for delivery updates.
|
|
149
|
+
*/
|
|
114
150
|
'phone'?: string | null;
|
|
115
151
|
}
|
|
116
152
|
/**
|
|
@@ -128,47 +164,60 @@ export interface Coupon {
|
|
|
128
164
|
'ref'?: string | null;
|
|
129
165
|
}
|
|
130
166
|
/**
|
|
131
|
-
*
|
|
167
|
+
* The request body for creating a new print-on-demand order.
|
|
132
168
|
*/
|
|
133
169
|
export interface CreateOrder {
|
|
134
170
|
/**
|
|
135
|
-
*
|
|
171
|
+
* 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.
|
|
136
172
|
*/
|
|
137
173
|
'merchantReference'?: string | null;
|
|
138
|
-
'contactInformation':
|
|
174
|
+
'contactInformation': ContactInformation1;
|
|
175
|
+
/**
|
|
176
|
+
* The address to ship the order to.
|
|
177
|
+
*/
|
|
139
178
|
'shippingAddress': Address;
|
|
179
|
+
/**
|
|
180
|
+
* Customs and tax registration details. Required for international shipments.
|
|
181
|
+
*/
|
|
140
182
|
'customsInformation'?: CustomsInformation;
|
|
141
183
|
/**
|
|
142
|
-
*
|
|
184
|
+
* The items to include in the order. Each item references a product variant from the Product Catalog API.
|
|
185
|
+
*/
|
|
186
|
+
'items': Array<CreateOrderItem>;
|
|
187
|
+
/**
|
|
188
|
+
* An optional list of preferred fulfiller IDs. When provided, the system will attempt to route the order to one of these fulfillers.
|
|
143
189
|
*/
|
|
144
|
-
'items': Array<OrderItem1>;
|
|
145
190
|
'preferredFulfillers'?: Array<string>;
|
|
146
191
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
'
|
|
152
|
-
|
|
192
|
+
export interface CreateOrderItem {
|
|
193
|
+
/**
|
|
194
|
+
* A reference to the variant being ordered
|
|
195
|
+
*/
|
|
196
|
+
'variantRef': string;
|
|
197
|
+
/**
|
|
198
|
+
* The number of units to order.
|
|
199
|
+
*/
|
|
200
|
+
'quantity': number;
|
|
201
|
+
'recipientCost'?: RecipientCost;
|
|
153
202
|
}
|
|
154
203
|
/**
|
|
155
204
|
* Customs information for the order. **Note:** Adding customs information to an order is only compatible with Shipmate at this time
|
|
156
205
|
*/
|
|
157
206
|
export interface CustomsInformation {
|
|
158
207
|
/**
|
|
159
|
-
*
|
|
208
|
+
* The type of tax pre-registration (e.g. IOSS for EU imports).
|
|
160
209
|
*/
|
|
161
210
|
'preRegistrationType'?: CustomsInformationPreRegistrationTypeEnum;
|
|
162
211
|
/**
|
|
163
|
-
*
|
|
212
|
+
* The pre-registration number associated with the registration type.
|
|
164
213
|
*/
|
|
165
214
|
'preRegistrationNumber'?: string;
|
|
166
215
|
/**
|
|
167
|
-
* VAT number
|
|
216
|
+
* The shipper\'s VAT registration number.
|
|
168
217
|
*/
|
|
169
218
|
'vatNumber'?: string;
|
|
170
219
|
/**
|
|
171
|
-
* EORI number
|
|
220
|
+
* The shipper\'s EORI number for customs declarations.
|
|
172
221
|
*/
|
|
173
222
|
'eoriNumber'?: string;
|
|
174
223
|
}
|
|
@@ -179,23 +228,41 @@ export const CustomsInformationPreRegistrationTypeEnum = {
|
|
|
179
228
|
|
|
180
229
|
export type CustomsInformationPreRegistrationTypeEnum = typeof CustomsInformationPreRegistrationTypeEnum[keyof typeof CustomsInformationPreRegistrationTypeEnum];
|
|
181
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Customs and tax registration details for international shipments.
|
|
233
|
+
*/
|
|
182
234
|
export interface CustomsInformation1 {
|
|
235
|
+
/**
|
|
236
|
+
* The type of tax pre-registration (e.g. IOSS for EU imports).
|
|
237
|
+
*/
|
|
183
238
|
'preRegistrationType'?: string;
|
|
239
|
+
/**
|
|
240
|
+
* The pre-registration number associated with the registration type.
|
|
241
|
+
*/
|
|
184
242
|
'preRegistrationNumber'?: string;
|
|
243
|
+
/**
|
|
244
|
+
* The shipper\'s VAT registration number.
|
|
245
|
+
*/
|
|
185
246
|
'vatNumber'?: string;
|
|
247
|
+
/**
|
|
248
|
+
* The shipper\'s EORI number for customs declarations.
|
|
249
|
+
*/
|
|
186
250
|
'eoriNumber'?: string;
|
|
187
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Estimated delivery window for this shipping method.
|
|
254
|
+
*/
|
|
188
255
|
export interface DeliveryEstimates {
|
|
189
256
|
/**
|
|
190
|
-
* Whether this is a priority shipping method. Fulfillments with priority methods aim for same
|
|
257
|
+
* 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.
|
|
191
258
|
*/
|
|
192
259
|
'isPriority'?: boolean;
|
|
193
260
|
/**
|
|
194
|
-
*
|
|
261
|
+
* The earliest estimated delivery date.
|
|
195
262
|
*/
|
|
196
263
|
'min'?: string;
|
|
197
264
|
/**
|
|
198
|
-
*
|
|
265
|
+
* The latest estimated delivery date.
|
|
199
266
|
*/
|
|
200
267
|
'max'?: string;
|
|
201
268
|
}
|
|
@@ -205,73 +272,103 @@ export interface ExportOrders202Response {
|
|
|
205
272
|
*/
|
|
206
273
|
'message'?: string;
|
|
207
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* The fulfiller that will produce and ship this package.
|
|
277
|
+
*/
|
|
278
|
+
export interface Fulfiller {
|
|
279
|
+
/**
|
|
280
|
+
* Unique identifier of the fulfiller.
|
|
281
|
+
*/
|
|
282
|
+
'id'?: string;
|
|
283
|
+
'location'?: FulfillerLocation;
|
|
284
|
+
/**
|
|
285
|
+
* Whether the fulfiller has the stock and capacity to begin processing immediately.
|
|
286
|
+
*/
|
|
287
|
+
'canFulfillImmediately'?: boolean | null;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* The geographic location of the fulfiller.
|
|
291
|
+
*/
|
|
292
|
+
export interface FulfillerLocation {
|
|
293
|
+
/**
|
|
294
|
+
* The city where the fulfiller is located.
|
|
295
|
+
*/
|
|
296
|
+
'city'?: string | null;
|
|
297
|
+
/**
|
|
298
|
+
* The country code where the fulfiller is located (ISO 3166-1 alpha-2).
|
|
299
|
+
*/
|
|
300
|
+
'country'?: string | null;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* A fulfillment group within an order. Each fulfillment represents a package that will be shipped separately, potentially from a different fulfiller.
|
|
304
|
+
*/
|
|
208
305
|
export interface Fulfillment {
|
|
209
306
|
/**
|
|
210
|
-
* Unique fulfillment
|
|
307
|
+
* Unique identifier for this fulfillment.
|
|
211
308
|
*/
|
|
212
309
|
'id'?: string;
|
|
310
|
+
/**
|
|
311
|
+
* The current status of this fulfillment.
|
|
312
|
+
*/
|
|
213
313
|
'status'?: Status;
|
|
214
|
-
'fulfiller'?:
|
|
314
|
+
'fulfiller'?: Fulfiller;
|
|
315
|
+
/**
|
|
316
|
+
* The items included in this fulfillment package.
|
|
317
|
+
*/
|
|
215
318
|
'items'?: Array<FulfillmentItem>;
|
|
216
319
|
'tracking'?: OrderTracking | null;
|
|
217
320
|
/**
|
|
218
|
-
*
|
|
321
|
+
* The shipping method currently assigned to this fulfillment.
|
|
219
322
|
*/
|
|
220
323
|
'shippingMethod'?: ShippingMethod;
|
|
221
324
|
/**
|
|
222
|
-
* Shipping methods available for this fulfillment.
|
|
325
|
+
* Shipping methods available for this fulfillment. Use one of these IDs when confirming the order.
|
|
223
326
|
*/
|
|
224
327
|
'availableShippingMethods'?: Array<ShippingMethod>;
|
|
225
328
|
/**
|
|
226
|
-
*
|
|
329
|
+
* The estimated weight of the package in grams.
|
|
227
330
|
*/
|
|
228
331
|
'packageWeight'?: number;
|
|
229
332
|
/**
|
|
230
|
-
*
|
|
333
|
+
* Reference to the source platform of this fulfillment.
|
|
231
334
|
*/
|
|
232
335
|
'platformRef'?: string;
|
|
233
336
|
}
|
|
234
337
|
|
|
235
338
|
|
|
236
|
-
/**
|
|
237
|
-
* The fulfiller that will be processing this order.
|
|
238
|
-
*/
|
|
239
|
-
export interface FulfillmentFulfiller {
|
|
240
|
-
/**
|
|
241
|
-
* Unique object identifier
|
|
242
|
-
*/
|
|
243
|
-
'id'?: string;
|
|
244
|
-
'location'?: FulfillmentFulfillerLocation;
|
|
245
|
-
'canFulfillImmediately'?: boolean | null;
|
|
246
|
-
}
|
|
247
|
-
export interface FulfillmentFulfillerLocation {
|
|
248
|
-
'city'?: string | null;
|
|
249
|
-
'country'?: string | null;
|
|
250
|
-
}
|
|
251
339
|
export interface FulfillmentItem {
|
|
252
340
|
/**
|
|
253
|
-
* Unique fulfillment item
|
|
341
|
+
* Unique identifier for this fulfillment item.
|
|
254
342
|
*/
|
|
255
343
|
'id'?: string;
|
|
256
344
|
/**
|
|
257
|
-
*
|
|
345
|
+
* The ID of the order item being fulfilled.
|
|
258
346
|
*/
|
|
259
347
|
'itemId'?: string;
|
|
260
348
|
/**
|
|
261
|
-
*
|
|
349
|
+
* The number of units of this item included in the fulfillment.
|
|
262
350
|
*/
|
|
263
351
|
'quantity'?: number;
|
|
264
352
|
}
|
|
265
353
|
/**
|
|
266
|
-
*
|
|
354
|
+
* A product image associated with an order item.
|
|
267
355
|
*/
|
|
268
356
|
export interface Image {
|
|
269
357
|
/**
|
|
270
|
-
* Unique
|
|
358
|
+
* Unique identifier for this image.
|
|
271
359
|
*/
|
|
272
360
|
'id'?: string;
|
|
361
|
+
/**
|
|
362
|
+
* The URL of the image.
|
|
363
|
+
*/
|
|
273
364
|
'src'?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Alternative text describing the image content.
|
|
367
|
+
*/
|
|
274
368
|
'alt'?: string;
|
|
369
|
+
/**
|
|
370
|
+
* The display order of this image relative to other images for the same item.
|
|
371
|
+
*/
|
|
275
372
|
'sortOrder'?: number;
|
|
276
373
|
}
|
|
277
374
|
export interface Option {
|
|
@@ -284,6 +381,9 @@ export interface Option {
|
|
|
284
381
|
*/
|
|
285
382
|
'value': string;
|
|
286
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* Represents a print-on-demand order placed on a project. An order contains items, fulfillment details, pricing, and status tracking.
|
|
386
|
+
*/
|
|
287
387
|
export interface Order {
|
|
288
388
|
/**
|
|
289
389
|
* Unique object identifier
|
|
@@ -293,44 +393,83 @@ export interface Order {
|
|
|
293
393
|
* A reference to the resource location
|
|
294
394
|
*/
|
|
295
395
|
'ref'?: string;
|
|
396
|
+
/**
|
|
397
|
+
* The current status of the order.
|
|
398
|
+
*/
|
|
296
399
|
'status'?: Status;
|
|
297
400
|
'contactInformation': ContactInformation;
|
|
298
401
|
'paymentMethod'?: PaymentMethod;
|
|
402
|
+
/**
|
|
403
|
+
* The address the order will be shipped to.
|
|
404
|
+
*/
|
|
299
405
|
'shippingAddress': Address;
|
|
300
406
|
'customsInformation'?: CustomsInformation1;
|
|
301
407
|
/**
|
|
302
|
-
*
|
|
408
|
+
* When the order was created.
|
|
303
409
|
*/
|
|
304
410
|
'createdAt'?: string;
|
|
305
411
|
/**
|
|
306
|
-
*
|
|
412
|
+
* When the order was last updated.
|
|
307
413
|
*/
|
|
308
414
|
'updatedAt'?: string;
|
|
309
415
|
/**
|
|
310
|
-
*
|
|
416
|
+
* When the order status last changed.
|
|
311
417
|
*/
|
|
312
418
|
'statusChangedAt'?: string;
|
|
313
419
|
/**
|
|
314
|
-
*
|
|
420
|
+
* Your own reference for this order, such as an order number from your storefront.
|
|
315
421
|
*/
|
|
316
422
|
'merchantReference'?: string | null;
|
|
423
|
+
/**
|
|
424
|
+
* The fulfillment groups for this order. Each fulfillment represents a package that will be shipped separately.
|
|
425
|
+
*/
|
|
317
426
|
'fulfillments'?: Array<Fulfillment>;
|
|
427
|
+
/**
|
|
428
|
+
* The line items included in this order.
|
|
429
|
+
*/
|
|
318
430
|
'items': Array<OrderItem>;
|
|
431
|
+
/**
|
|
432
|
+
* The total price of the order including tax and after discounts.
|
|
433
|
+
*/
|
|
319
434
|
'totalPrice'?: Price;
|
|
435
|
+
/**
|
|
436
|
+
* The total tax amount for the order.
|
|
437
|
+
*/
|
|
320
438
|
'taxPrice'?: Price;
|
|
439
|
+
/**
|
|
440
|
+
* The net items price excluding tax and before discounts.
|
|
441
|
+
*/
|
|
321
442
|
'subtotalPrice'?: Price;
|
|
443
|
+
/**
|
|
444
|
+
* The total discount amount applied to the order.
|
|
445
|
+
*/
|
|
322
446
|
'discountPrice'?: Price;
|
|
447
|
+
/**
|
|
448
|
+
* The coupon applied to the order, if any.
|
|
449
|
+
*/
|
|
323
450
|
'coupon'?: Coupon | null;
|
|
451
|
+
/**
|
|
452
|
+
* The total shipping cost for the order.
|
|
453
|
+
*/
|
|
324
454
|
'shippingPrice'?: Price;
|
|
325
455
|
'origin'?: Origin;
|
|
456
|
+
/**
|
|
457
|
+
* A chronological list of status changes for this order.
|
|
458
|
+
*/
|
|
326
459
|
'statusHistory'?: Array<StatusHistoryItem>;
|
|
460
|
+
/**
|
|
461
|
+
* A list of payment attempts made for this order.
|
|
462
|
+
*/
|
|
327
463
|
'paymentAttempts'?: Array<PaymentAttempt>;
|
|
328
464
|
}
|
|
329
465
|
|
|
330
466
|
|
|
467
|
+
/**
|
|
468
|
+
* A line item in an order, representing a specific product variant and quantity.
|
|
469
|
+
*/
|
|
331
470
|
export interface OrderItem {
|
|
332
471
|
/**
|
|
333
|
-
* Unique
|
|
472
|
+
* Unique identifier for this order item.
|
|
334
473
|
*/
|
|
335
474
|
'id'?: string;
|
|
336
475
|
/**
|
|
@@ -341,42 +480,54 @@ export interface OrderItem {
|
|
|
341
480
|
* Options associated to an order item\'s variant, such as color and size.
|
|
342
481
|
*/
|
|
343
482
|
'options'?: Array<Option>;
|
|
483
|
+
/**
|
|
484
|
+
* The number of units of this variant to order.
|
|
485
|
+
*/
|
|
344
486
|
'quantity': number;
|
|
345
487
|
/**
|
|
346
|
-
* The name of the product
|
|
488
|
+
* The display name of the product.
|
|
347
489
|
*/
|
|
348
490
|
'name'?: string;
|
|
349
491
|
/**
|
|
350
|
-
*
|
|
492
|
+
* Product images associated with this item.
|
|
351
493
|
*/
|
|
352
494
|
'images'?: Array<Image>;
|
|
495
|
+
/**
|
|
496
|
+
* The total price for this line item including tax and after discounts.
|
|
497
|
+
*/
|
|
353
498
|
'totalPrice'?: Price;
|
|
354
499
|
/**
|
|
355
|
-
* This is an estimate until the order has been confirmed
|
|
500
|
+
* The tax amount for this line item. This is an estimate until the order has been confirmed.
|
|
356
501
|
*/
|
|
357
502
|
'taxPrice'?: Price;
|
|
503
|
+
/**
|
|
504
|
+
* The net price for this line item, excluding tax and before discounts.
|
|
505
|
+
*/
|
|
358
506
|
'subtotalPrice'?: Price;
|
|
507
|
+
/**
|
|
508
|
+
* The discount amount applied to this line item.
|
|
509
|
+
*/
|
|
359
510
|
'discountPrice'?: Price;
|
|
360
511
|
/**
|
|
361
|
-
* The price you charged the recipient for each item.
|
|
512
|
+
* The price you charged the recipient for each item. Highly recommended for international orders as it aids customs declarations.
|
|
362
513
|
*/
|
|
363
514
|
'recipientCost'?: Price;
|
|
364
515
|
}
|
|
365
|
-
|
|
516
|
+
/**
|
|
517
|
+
* Shipment tracking information. Available once the fulfillment has been dispatched.
|
|
518
|
+
*/
|
|
519
|
+
export interface OrderTracking {
|
|
366
520
|
/**
|
|
367
|
-
*
|
|
521
|
+
* The name of the courier service.
|
|
368
522
|
*/
|
|
369
|
-
'variantRef': string;
|
|
370
|
-
'quantity': number;
|
|
371
|
-
'recipientCost'?: OrderItem1RecipientCost;
|
|
372
|
-
}
|
|
373
|
-
export interface OrderItem1RecipientCost {
|
|
374
|
-
'amount': string;
|
|
375
|
-
'currencyCode': string;
|
|
376
|
-
}
|
|
377
|
-
export interface OrderTracking {
|
|
378
523
|
'courier'?: string;
|
|
524
|
+
/**
|
|
525
|
+
* The tracking code provided by the courier.
|
|
526
|
+
*/
|
|
379
527
|
'code'?: string;
|
|
528
|
+
/**
|
|
529
|
+
* A URL to track the shipment on the courier\'s website.
|
|
530
|
+
*/
|
|
380
531
|
'url'?: string;
|
|
381
532
|
}
|
|
382
533
|
export interface OrdersResponse {
|
|
@@ -386,17 +537,35 @@ export interface OrdersResponse {
|
|
|
386
537
|
*/
|
|
387
538
|
'nextPageToken'?: number | null;
|
|
388
539
|
}
|
|
540
|
+
/**
|
|
541
|
+
* The marketing or acquisition source of the order, such as `facebook_cpc`, `google_cpc`, or `organic`.
|
|
542
|
+
*/
|
|
389
543
|
export interface Origin {
|
|
544
|
+
/**
|
|
545
|
+
* A short identifier for the acquisition source, such as `facebook_cpc`, `google_cpc`, `instagram_cpc`, or `organic`.
|
|
546
|
+
*/
|
|
390
547
|
'code'?: string;
|
|
548
|
+
/**
|
|
549
|
+
* Whether this origin represents paid advertising traffic.
|
|
550
|
+
*/
|
|
391
551
|
'isPaid'?: boolean;
|
|
392
552
|
}
|
|
393
|
-
/**
|
|
394
|
-
* List of payment attempts for this order
|
|
395
|
-
*/
|
|
396
553
|
export interface PaymentAttempt {
|
|
554
|
+
/**
|
|
555
|
+
* The payment provider used.
|
|
556
|
+
*/
|
|
397
557
|
'paymentProvider'?: PaymentAttemptPaymentProviderEnum;
|
|
558
|
+
/**
|
|
559
|
+
* The outcome of the payment attempt.
|
|
560
|
+
*/
|
|
398
561
|
'status'?: PaymentAttemptStatusEnum;
|
|
562
|
+
/**
|
|
563
|
+
* The transaction ID from the payment provider.
|
|
564
|
+
*/
|
|
399
565
|
'transactionId'?: string | null;
|
|
566
|
+
/**
|
|
567
|
+
* A human-readable message describing the payment result.
|
|
568
|
+
*/
|
|
400
569
|
'message'?: string;
|
|
401
570
|
/**
|
|
402
571
|
* ISO 8601 Timestamp
|
|
@@ -420,35 +589,133 @@ export const PaymentAttemptStatusEnum = {
|
|
|
420
589
|
|
|
421
590
|
export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
|
|
422
591
|
|
|
592
|
+
/**
|
|
593
|
+
* The payment method used for this order.
|
|
594
|
+
*/
|
|
423
595
|
export interface PaymentMethod {
|
|
596
|
+
/**
|
|
597
|
+
* The type of payment method used.
|
|
598
|
+
*/
|
|
424
599
|
'type'?: string | null;
|
|
425
600
|
}
|
|
426
601
|
/**
|
|
427
|
-
*
|
|
602
|
+
* A monetary value with its currency.
|
|
428
603
|
*/
|
|
429
604
|
export interface Price {
|
|
430
605
|
/**
|
|
431
|
-
*
|
|
606
|
+
* The monetary amount as a decimal string.
|
|
432
607
|
*/
|
|
433
608
|
'amount'?: string;
|
|
434
609
|
/**
|
|
435
|
-
*
|
|
610
|
+
* ISO 4217 currency code.
|
|
436
611
|
*/
|
|
437
612
|
'currencyCode'?: string;
|
|
438
613
|
}
|
|
439
|
-
|
|
614
|
+
/**
|
|
615
|
+
* 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).
|
|
616
|
+
*/
|
|
617
|
+
export interface ProductUnavailableError {
|
|
618
|
+
'code': ProductUnavailableErrorCodeEnum;
|
|
619
|
+
/**
|
|
620
|
+
* Human-readable description including the product name.
|
|
621
|
+
*/
|
|
622
|
+
'message': string;
|
|
623
|
+
/**
|
|
624
|
+
* Display name of the product.
|
|
625
|
+
*/
|
|
626
|
+
'productTitle': string;
|
|
440
627
|
/**
|
|
441
628
|
* Unique object identifier
|
|
442
629
|
*/
|
|
630
|
+
'variantId': string;
|
|
631
|
+
/**
|
|
632
|
+
* A reference to the variant being ordered
|
|
633
|
+
*/
|
|
634
|
+
'variantRef': string;
|
|
635
|
+
/**
|
|
636
|
+
* The quantity that was requested in the order.
|
|
637
|
+
*/
|
|
638
|
+
'requestedQuantity': number;
|
|
639
|
+
/**
|
|
640
|
+
* Always 0 for this error type.
|
|
641
|
+
*/
|
|
642
|
+
'availableQuantity': ProductUnavailableErrorAvailableQuantityEnum;
|
|
643
|
+
/**
|
|
644
|
+
* The full requested quantity, representing the total unfulfillable amount.
|
|
645
|
+
*/
|
|
646
|
+
'shortage': number;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export const ProductUnavailableErrorCodeEnum = {
|
|
650
|
+
ProductUnavailable: 'PRODUCT_UNAVAILABLE'
|
|
651
|
+
} as const;
|
|
652
|
+
|
|
653
|
+
export type ProductUnavailableErrorCodeEnum = typeof ProductUnavailableErrorCodeEnum[keyof typeof ProductUnavailableErrorCodeEnum];
|
|
654
|
+
export const ProductUnavailableErrorAvailableQuantityEnum = {
|
|
655
|
+
NUMBER_0: 0
|
|
656
|
+
} as const;
|
|
657
|
+
|
|
658
|
+
export type ProductUnavailableErrorAvailableQuantityEnum = typeof ProductUnavailableErrorAvailableQuantityEnum[keyof typeof ProductUnavailableErrorAvailableQuantityEnum];
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* The price you charged the end customer for this item. Highly recommended for international orders as it is used for customs declarations.
|
|
662
|
+
*/
|
|
663
|
+
export interface RecipientCost {
|
|
664
|
+
/**
|
|
665
|
+
* The monetary amount as a decimal string.
|
|
666
|
+
*/
|
|
667
|
+
'amount': string;
|
|
668
|
+
/**
|
|
669
|
+
* ISO 4217 currency code.
|
|
670
|
+
*/
|
|
671
|
+
'currencyCode': string;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Your own shipping label details.
|
|
675
|
+
*/
|
|
676
|
+
export interface Shipment {
|
|
677
|
+
/**
|
|
678
|
+
* A URL to the shipping label image or PDF.
|
|
679
|
+
*/
|
|
680
|
+
'image': string;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* A shipping option available for a fulfillment, including delivery estimates and pricing.
|
|
684
|
+
*/
|
|
685
|
+
export interface ShippingMethod {
|
|
686
|
+
/**
|
|
687
|
+
* Unique identifier for this shipping method. Use this when confirming a fulfillment.
|
|
688
|
+
*/
|
|
443
689
|
'id'?: string;
|
|
690
|
+
/**
|
|
691
|
+
* The display name of the shipping method.
|
|
692
|
+
*/
|
|
444
693
|
'name'?: string;
|
|
694
|
+
/**
|
|
695
|
+
* A brief description of the shipping method\'s service level.
|
|
696
|
+
*/
|
|
445
697
|
'description'?: string;
|
|
446
698
|
'deliveryEstimates'?: DeliveryEstimates;
|
|
699
|
+
/**
|
|
700
|
+
* The total shipping cost including tax.
|
|
701
|
+
*/
|
|
447
702
|
'totalPrice'?: Price;
|
|
703
|
+
/**
|
|
704
|
+
* The tax portion of the shipping cost.
|
|
705
|
+
*/
|
|
448
706
|
'taxPrice'?: Price;
|
|
707
|
+
/**
|
|
708
|
+
* The net shipping cost, excluding tax and before discounts.
|
|
709
|
+
*/
|
|
449
710
|
'subtotalPrice'?: Price;
|
|
711
|
+
/**
|
|
712
|
+
* Any discount applied to the shipping cost.
|
|
713
|
+
*/
|
|
450
714
|
'discountPrice'?: Price;
|
|
451
715
|
}
|
|
716
|
+
/**
|
|
717
|
+
* 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
|
|
718
|
+
*/
|
|
452
719
|
|
|
453
720
|
export const Status = {
|
|
454
721
|
New: 'new',
|
|
@@ -472,6 +739,52 @@ export interface StatusHistoryItem {
|
|
|
472
739
|
}
|
|
473
740
|
|
|
474
741
|
|
|
742
|
+
/**
|
|
743
|
+
* @type StockConflictError
|
|
744
|
+
*/
|
|
745
|
+
export type StockConflictError = { code: 'PRODUCT_UNAVAILABLE' } & ProductUnavailableError | { code: 'STOCK_UNAVAILABLE' } & StockUnavailableError;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* The requested quantity exceeds available stock. The item can still be ordered in a smaller quantity.
|
|
749
|
+
*/
|
|
750
|
+
export interface StockUnavailableError {
|
|
751
|
+
'code': StockUnavailableErrorCodeEnum;
|
|
752
|
+
/**
|
|
753
|
+
* Human-readable description including the product name and available quantity.
|
|
754
|
+
*/
|
|
755
|
+
'message': string;
|
|
756
|
+
/**
|
|
757
|
+
* Display name of the product.
|
|
758
|
+
*/
|
|
759
|
+
'productTitle': string;
|
|
760
|
+
/**
|
|
761
|
+
* Unique object identifier
|
|
762
|
+
*/
|
|
763
|
+
'variantId': string;
|
|
764
|
+
/**
|
|
765
|
+
* A reference to the variant being ordered
|
|
766
|
+
*/
|
|
767
|
+
'variantRef': string;
|
|
768
|
+
/**
|
|
769
|
+
* The quantity that was requested in the order.
|
|
770
|
+
*/
|
|
771
|
+
'requestedQuantity': number;
|
|
772
|
+
/**
|
|
773
|
+
* The quantity currently available for fulfillment.
|
|
774
|
+
*/
|
|
775
|
+
'availableQuantity': number;
|
|
776
|
+
/**
|
|
777
|
+
* The difference between requested and available quantity (positive value indicating the deficit).
|
|
778
|
+
*/
|
|
779
|
+
'shortage': number;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export const StockUnavailableErrorCodeEnum = {
|
|
783
|
+
StockUnavailable: 'STOCK_UNAVAILABLE'
|
|
784
|
+
} as const;
|
|
785
|
+
|
|
786
|
+
export type StockUnavailableErrorCodeEnum = typeof StockUnavailableErrorCodeEnum[keyof typeof StockUnavailableErrorCodeEnum];
|
|
787
|
+
|
|
475
788
|
|
|
476
789
|
/**
|
|
477
790
|
* OrdersApi - axios parameter creator
|
|
@@ -481,7 +794,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
481
794
|
/**
|
|
482
795
|
* Cancels an order if it has not yet started processing.
|
|
483
796
|
* @summary Cancel order
|
|
484
|
-
* @param {string} project
|
|
797
|
+
* @param {string} project The project identifier to scope the request to.
|
|
485
798
|
* @param {string} orderId Unique identifier of an order
|
|
486
799
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
487
800
|
* @param {*} [options] Override http request option.
|
|
@@ -520,8 +833,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
520
833
|
localVarQueryParameter['fields'] = fields;
|
|
521
834
|
}
|
|
522
835
|
|
|
836
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
523
837
|
|
|
524
|
-
|
|
525
838
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
526
839
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
527
840
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -534,9 +847,9 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
534
847
|
/**
|
|
535
848
|
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
536
849
|
* @summary Confirm order
|
|
537
|
-
* @param {string} project
|
|
850
|
+
* @param {string} project The project identifier to scope the request to.
|
|
538
851
|
* @param {string} orderId Unique identifier of an order
|
|
539
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest
|
|
852
|
+
* @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.
|
|
540
853
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
541
854
|
* @param {*} [options] Override http request option.
|
|
542
855
|
* @throws {RequiredError}
|
|
@@ -576,9 +889,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
576
889
|
localVarQueryParameter['fields'] = fields;
|
|
577
890
|
}
|
|
578
891
|
|
|
579
|
-
|
|
580
|
-
|
|
581
892
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
893
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
582
894
|
|
|
583
895
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
584
896
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -593,7 +905,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
593
905
|
/**
|
|
594
906
|
* 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.
|
|
595
907
|
* @summary Create order
|
|
596
|
-
* @param {string} project
|
|
908
|
+
* @param {string} project The project identifier to scope the request to.
|
|
597
909
|
* @param {CreateOrder} createOrder Create Order schema
|
|
598
910
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
599
911
|
* @param {*} [options] Override http request option.
|
|
@@ -631,9 +943,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
631
943
|
localVarQueryParameter['fields'] = fields;
|
|
632
944
|
}
|
|
633
945
|
|
|
634
|
-
|
|
635
|
-
|
|
636
946
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
947
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
637
948
|
|
|
638
949
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
639
950
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -648,7 +959,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
648
959
|
/**
|
|
649
960
|
* Download an order invoice.
|
|
650
961
|
* @summary Download order invoice
|
|
651
|
-
* @param {string} project
|
|
962
|
+
* @param {string} project The project identifier to scope the request to.
|
|
652
963
|
* @param {string} orderId Unique identifier of an order
|
|
653
964
|
* @param {*} [options] Override http request option.
|
|
654
965
|
* @throws {RequiredError}
|
|
@@ -682,8 +993,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
682
993
|
localVarQueryParameter['project'] = project;
|
|
683
994
|
}
|
|
684
995
|
|
|
996
|
+
localVarHeaderParameter['Accept'] = 'application/pdf,application/json';
|
|
685
997
|
|
|
686
|
-
|
|
687
998
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
688
999
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
689
1000
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -696,9 +1007,9 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
696
1007
|
/**
|
|
697
1008
|
* Export orders as a CSV file
|
|
698
1009
|
* @summary Export orders
|
|
699
|
-
* @param {string} project
|
|
700
|
-
* @param {string} start Start of date range to filter by when orders were placed
|
|
701
|
-
* @param {string} [end] End of date range
|
|
1010
|
+
* @param {string} project The project identifier to scope the request to.
|
|
1011
|
+
* @param {string} start Start of the date range to filter by when orders were placed.
|
|
1012
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
702
1013
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
703
1014
|
* @param {*} [options] Override http request option.
|
|
704
1015
|
* @throws {RequiredError}
|
|
@@ -747,8 +1058,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
747
1058
|
localVarQueryParameter['search'] = search;
|
|
748
1059
|
}
|
|
749
1060
|
|
|
1061
|
+
localVarHeaderParameter['Accept'] = 'text/csv; charset=utf-8,application/json';
|
|
750
1062
|
|
|
751
|
-
|
|
752
1063
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
753
1064
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
754
1065
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -761,7 +1072,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
761
1072
|
/**
|
|
762
1073
|
* Get an order by a given ID.
|
|
763
1074
|
* @summary Get order
|
|
764
|
-
* @param {string} project
|
|
1075
|
+
* @param {string} project The project identifier to scope the request to.
|
|
765
1076
|
* @param {string} orderId Unique identifier of an order
|
|
766
1077
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
767
1078
|
* @param {*} [options] Override http request option.
|
|
@@ -800,8 +1111,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
800
1111
|
localVarQueryParameter['fields'] = fields;
|
|
801
1112
|
}
|
|
802
1113
|
|
|
1114
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
803
1115
|
|
|
804
|
-
|
|
805
1116
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
806
1117
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
807
1118
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -814,15 +1125,15 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
814
1125
|
/**
|
|
815
1126
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
816
1127
|
* @summary List orders
|
|
817
|
-
* @param {string} project
|
|
1128
|
+
* @param {string} project The project identifier to scope the request to.
|
|
818
1129
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
819
1130
|
* @param {number} [pageToken] Page reference token
|
|
820
1131
|
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
821
1132
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
822
|
-
* @param {Array<string>} [ids]
|
|
823
|
-
* @param {Array<Status>} [statuses] Filter by
|
|
824
|
-
* @param {string} [start] Start of date range
|
|
825
|
-
* @param {string} [end] End of date range
|
|
1133
|
+
* @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
|
|
1134
|
+
* @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
|
|
1135
|
+
* @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
1136
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
826
1137
|
* @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query.
|
|
827
1138
|
* @param {*} [options] Override http request option.
|
|
828
1139
|
* @throws {RequiredError}
|
|
@@ -893,8 +1204,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
893
1204
|
localVarQueryParameter['dateFilterType'] = dateFilterType;
|
|
894
1205
|
}
|
|
895
1206
|
|
|
1207
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
896
1208
|
|
|
897
|
-
|
|
898
1209
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
899
1210
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
900
1211
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -907,7 +1218,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
907
1218
|
/**
|
|
908
1219
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
909
1220
|
* @summary Retry
|
|
910
|
-
* @param {string} project
|
|
1221
|
+
* @param {string} project The project identifier to scope the request to.
|
|
911
1222
|
* @param {string} orderId Unique identifier of an order
|
|
912
1223
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
913
1224
|
* @param {*} [options] Override http request option.
|
|
@@ -946,8 +1257,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
946
1257
|
localVarQueryParameter['fields'] = fields;
|
|
947
1258
|
}
|
|
948
1259
|
|
|
1260
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
949
1261
|
|
|
950
|
-
|
|
951
1262
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
952
1263
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
953
1264
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -969,7 +1280,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
969
1280
|
/**
|
|
970
1281
|
* Cancels an order if it has not yet started processing.
|
|
971
1282
|
* @summary Cancel order
|
|
972
|
-
* @param {string} project
|
|
1283
|
+
* @param {string} project The project identifier to scope the request to.
|
|
973
1284
|
* @param {string} orderId Unique identifier of an order
|
|
974
1285
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
975
1286
|
* @param {*} [options] Override http request option.
|
|
@@ -984,9 +1295,9 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
984
1295
|
/**
|
|
985
1296
|
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
986
1297
|
* @summary Confirm order
|
|
987
|
-
* @param {string} project
|
|
1298
|
+
* @param {string} project The project identifier to scope the request to.
|
|
988
1299
|
* @param {string} orderId Unique identifier of an order
|
|
989
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest
|
|
1300
|
+
* @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.
|
|
990
1301
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
991
1302
|
* @param {*} [options] Override http request option.
|
|
992
1303
|
* @throws {RequiredError}
|
|
@@ -1000,7 +1311,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1000
1311
|
/**
|
|
1001
1312
|
* 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.
|
|
1002
1313
|
* @summary Create order
|
|
1003
|
-
* @param {string} project
|
|
1314
|
+
* @param {string} project The project identifier to scope the request to.
|
|
1004
1315
|
* @param {CreateOrder} createOrder Create Order schema
|
|
1005
1316
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
1006
1317
|
* @param {*} [options] Override http request option.
|
|
@@ -1015,7 +1326,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1015
1326
|
/**
|
|
1016
1327
|
* Download an order invoice.
|
|
1017
1328
|
* @summary Download order invoice
|
|
1018
|
-
* @param {string} project
|
|
1329
|
+
* @param {string} project The project identifier to scope the request to.
|
|
1019
1330
|
* @param {string} orderId Unique identifier of an order
|
|
1020
1331
|
* @param {*} [options] Override http request option.
|
|
1021
1332
|
* @throws {RequiredError}
|
|
@@ -1029,9 +1340,9 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1029
1340
|
/**
|
|
1030
1341
|
* Export orders as a CSV file
|
|
1031
1342
|
* @summary Export orders
|
|
1032
|
-
* @param {string} project
|
|
1033
|
-
* @param {string} start Start of date range to filter by when orders were placed
|
|
1034
|
-
* @param {string} [end] End of date range
|
|
1343
|
+
* @param {string} project The project identifier to scope the request to.
|
|
1344
|
+
* @param {string} start Start of the date range to filter by when orders were placed.
|
|
1345
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
1035
1346
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
1036
1347
|
* @param {*} [options] Override http request option.
|
|
1037
1348
|
* @throws {RequiredError}
|
|
@@ -1045,7 +1356,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1045
1356
|
/**
|
|
1046
1357
|
* Get an order by a given ID.
|
|
1047
1358
|
* @summary Get order
|
|
1048
|
-
* @param {string} project
|
|
1359
|
+
* @param {string} project The project identifier to scope the request to.
|
|
1049
1360
|
* @param {string} orderId Unique identifier of an order
|
|
1050
1361
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
1051
1362
|
* @param {*} [options] Override http request option.
|
|
@@ -1060,15 +1371,15 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1060
1371
|
/**
|
|
1061
1372
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
1062
1373
|
* @summary List orders
|
|
1063
|
-
* @param {string} project
|
|
1374
|
+
* @param {string} project The project identifier to scope the request to.
|
|
1064
1375
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
1065
1376
|
* @param {number} [pageToken] Page reference token
|
|
1066
1377
|
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
1067
1378
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
1068
|
-
* @param {Array<string>} [ids]
|
|
1069
|
-
* @param {Array<Status>} [statuses] Filter by
|
|
1070
|
-
* @param {string} [start] Start of date range
|
|
1071
|
-
* @param {string} [end] End of date range
|
|
1379
|
+
* @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
|
|
1380
|
+
* @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
|
|
1381
|
+
* @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
1382
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
1072
1383
|
* @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query.
|
|
1073
1384
|
* @param {*} [options] Override http request option.
|
|
1074
1385
|
* @throws {RequiredError}
|
|
@@ -1082,7 +1393,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1082
1393
|
/**
|
|
1083
1394
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
1084
1395
|
* @summary Retry
|
|
1085
|
-
* @param {string} project
|
|
1396
|
+
* @param {string} project The project identifier to scope the request to.
|
|
1086
1397
|
* @param {string} orderId Unique identifier of an order
|
|
1087
1398
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
1088
1399
|
* @param {*} [options] Override http request option.
|
|
@@ -1191,7 +1502,7 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
|
|
|
1191
1502
|
*/
|
|
1192
1503
|
export interface OrdersApiCancelOrderRequest {
|
|
1193
1504
|
/**
|
|
1194
|
-
*
|
|
1505
|
+
* The project identifier to scope the request to.
|
|
1195
1506
|
*/
|
|
1196
1507
|
readonly project: string
|
|
1197
1508
|
|
|
@@ -1211,7 +1522,7 @@ export interface OrdersApiCancelOrderRequest {
|
|
|
1211
1522
|
*/
|
|
1212
1523
|
export interface OrdersApiConfirmOrderRequest {
|
|
1213
1524
|
/**
|
|
1214
|
-
*
|
|
1525
|
+
* The project identifier to scope the request to.
|
|
1215
1526
|
*/
|
|
1216
1527
|
readonly project: string
|
|
1217
1528
|
|
|
@@ -1221,7 +1532,7 @@ export interface OrdersApiConfirmOrderRequest {
|
|
|
1221
1532
|
readonly orderId: string
|
|
1222
1533
|
|
|
1223
1534
|
/**
|
|
1224
|
-
*
|
|
1535
|
+
* 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.
|
|
1225
1536
|
*/
|
|
1226
1537
|
readonly confirmOrderRequest: ConfirmOrderRequest
|
|
1227
1538
|
|
|
@@ -1236,7 +1547,7 @@ export interface OrdersApiConfirmOrderRequest {
|
|
|
1236
1547
|
*/
|
|
1237
1548
|
export interface OrdersApiCreateOrderRequest {
|
|
1238
1549
|
/**
|
|
1239
|
-
*
|
|
1550
|
+
* The project identifier to scope the request to.
|
|
1240
1551
|
*/
|
|
1241
1552
|
readonly project: string
|
|
1242
1553
|
|
|
@@ -1256,7 +1567,7 @@ export interface OrdersApiCreateOrderRequest {
|
|
|
1256
1567
|
*/
|
|
1257
1568
|
export interface OrdersApiDownloadInvoiceRequest {
|
|
1258
1569
|
/**
|
|
1259
|
-
*
|
|
1570
|
+
* The project identifier to scope the request to.
|
|
1260
1571
|
*/
|
|
1261
1572
|
readonly project: string
|
|
1262
1573
|
|
|
@@ -1271,17 +1582,17 @@ export interface OrdersApiDownloadInvoiceRequest {
|
|
|
1271
1582
|
*/
|
|
1272
1583
|
export interface OrdersApiExportOrdersRequest {
|
|
1273
1584
|
/**
|
|
1274
|
-
*
|
|
1585
|
+
* The project identifier to scope the request to.
|
|
1275
1586
|
*/
|
|
1276
1587
|
readonly project: string
|
|
1277
1588
|
|
|
1278
1589
|
/**
|
|
1279
|
-
* Start of date range to filter by when orders were placed
|
|
1590
|
+
* Start of the date range to filter by when orders were placed.
|
|
1280
1591
|
*/
|
|
1281
1592
|
readonly start: string
|
|
1282
1593
|
|
|
1283
1594
|
/**
|
|
1284
|
-
* End of date range
|
|
1595
|
+
* End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
1285
1596
|
*/
|
|
1286
1597
|
readonly end?: string
|
|
1287
1598
|
|
|
@@ -1296,7 +1607,7 @@ export interface OrdersApiExportOrdersRequest {
|
|
|
1296
1607
|
*/
|
|
1297
1608
|
export interface OrdersApiGetOrderRequest {
|
|
1298
1609
|
/**
|
|
1299
|
-
*
|
|
1610
|
+
* The project identifier to scope the request to.
|
|
1300
1611
|
*/
|
|
1301
1612
|
readonly project: string
|
|
1302
1613
|
|
|
@@ -1316,7 +1627,7 @@ export interface OrdersApiGetOrderRequest {
|
|
|
1316
1627
|
*/
|
|
1317
1628
|
export interface OrdersApiGetOrdersRequest {
|
|
1318
1629
|
/**
|
|
1319
|
-
*
|
|
1630
|
+
* The project identifier to scope the request to.
|
|
1320
1631
|
*/
|
|
1321
1632
|
readonly project: string
|
|
1322
1633
|
|
|
@@ -1341,22 +1652,22 @@ export interface OrdersApiGetOrdersRequest {
|
|
|
1341
1652
|
readonly search?: string
|
|
1342
1653
|
|
|
1343
1654
|
/**
|
|
1344
|
-
*
|
|
1655
|
+
* Filter to specific order IDs. Only orders matching these IDs will be returned.
|
|
1345
1656
|
*/
|
|
1346
1657
|
readonly ids?: Array<string>
|
|
1347
1658
|
|
|
1348
1659
|
/**
|
|
1349
|
-
* Filter by
|
|
1660
|
+
* Filter by order status. Only orders matching one of the given statuses will be returned.
|
|
1350
1661
|
*/
|
|
1351
1662
|
readonly statuses?: Array<Status>
|
|
1352
1663
|
|
|
1353
1664
|
/**
|
|
1354
|
-
* Start of date range
|
|
1665
|
+
* Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
1355
1666
|
*/
|
|
1356
1667
|
readonly start?: string
|
|
1357
1668
|
|
|
1358
1669
|
/**
|
|
1359
|
-
* End of date range
|
|
1670
|
+
* End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
1360
1671
|
*/
|
|
1361
1672
|
readonly end?: string
|
|
1362
1673
|
|
|
@@ -1371,7 +1682,7 @@ export interface OrdersApiGetOrdersRequest {
|
|
|
1371
1682
|
*/
|
|
1372
1683
|
export interface OrdersApiRetryPlatformPaymentRequest {
|
|
1373
1684
|
/**
|
|
1374
|
-
*
|
|
1685
|
+
* The project identifier to scope the request to.
|
|
1375
1686
|
*/
|
|
1376
1687
|
readonly project: string
|
|
1377
1688
|
|