@zippendo/sdk 1.1.4 → 1.2.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/dist/apis/ShipmentsApi.d.ts +2 -2
- package/dist/apis/ShipmentsApi.js +2 -2
- package/dist/esm/apis/ShipmentsApi.d.ts +2 -2
- package/dist/esm/apis/ShipmentsApi.js +2 -2
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.js +1 -0
- package/dist/esm/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/esm/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.js +1 -3
- package/dist/esm/models/CreateShipmentRequest.d.ts +14 -1
- package/dist/esm/models/CreateShipmentRequest.js +6 -3
- package/dist/esm/models/CreateShipmentRequestCarrierSettings.d.ts +1 -1
- package/dist/esm/models/CreateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/esm/models/CreateShipmentRequestDroppoint.js +54 -0
- package/dist/esm/models/CreateShipmentRequestParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/esm/models/CreateShipmentRequestParcelsInnerOrderLinesInner.js +1 -3
- package/dist/esm/models/GetOrder200ResponseShipmentsInner.d.ts +6 -0
- package/dist/esm/models/GetOrder200ResponseShipmentsInner.js +2 -0
- package/dist/esm/models/ListApiTokens401Response.d.ts +1 -0
- package/dist/esm/models/ListApiTokens401Response.js +1 -0
- package/dist/esm/models/SendShipment422Response.d.ts +1 -0
- package/dist/esm/models/SendShipment422Response.js +1 -0
- package/dist/esm/models/UpdateShipmentRequest.d.ts +10 -3
- package/dist/esm/models/UpdateShipmentRequest.js +6 -3
- package/dist/esm/models/UpdateShipmentRequestCarrierSettings.d.ts +53 -0
- package/dist/esm/models/UpdateShipmentRequestCarrierSettings.js +57 -0
- package/dist/esm/models/UpdateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/esm/models/UpdateShipmentRequestDroppoint.js +54 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.js +1 -0
- package/dist/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.js +1 -3
- package/dist/models/CreateShipmentRequest.d.ts +14 -1
- package/dist/models/CreateShipmentRequest.js +6 -3
- package/dist/models/CreateShipmentRequestCarrierSettings.d.ts +1 -1
- package/dist/models/CreateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/models/CreateShipmentRequestDroppoint.js +61 -0
- package/dist/models/CreateShipmentRequestParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/models/CreateShipmentRequestParcelsInnerOrderLinesInner.js +1 -3
- package/dist/models/GetOrder200ResponseShipmentsInner.d.ts +6 -0
- package/dist/models/GetOrder200ResponseShipmentsInner.js +2 -0
- package/dist/models/ListApiTokens401Response.d.ts +1 -0
- package/dist/models/ListApiTokens401Response.js +1 -0
- package/dist/models/SendShipment422Response.d.ts +1 -0
- package/dist/models/SendShipment422Response.js +1 -0
- package/dist/models/UpdateShipmentRequest.d.ts +10 -3
- package/dist/models/UpdateShipmentRequest.js +6 -3
- package/dist/models/UpdateShipmentRequestCarrierSettings.d.ts +53 -0
- package/dist/models/UpdateShipmentRequestCarrierSettings.js +64 -0
- package/dist/models/UpdateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/models/UpdateShipmentRequestDroppoint.js +61 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/CreateShipmentRequest.md +4 -0
- package/docs/CreateShipmentRequestCarrierSettings.md +1 -0
- package/docs/CreateShipmentRequestDroppoint.md +41 -0
- package/docs/GetOrder200ResponseShipmentsInner.md +2 -0
- package/docs/ShipmentsApi.md +1 -1
- package/docs/UpdateShipmentRequest.md +3 -1
- package/docs/UpdateShipmentRequestCarrierSettings.md +40 -0
- package/docs/UpdateShipmentRequestDroppoint.md +41 -0
- package/package.json +1 -1
- package/src/apis/ShipmentsApi.ts +2 -2
- package/src/models/BatchSendShipments200ResponseResultsInner.ts +1 -0
- package/src/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.ts +3 -4
- package/src/models/CreateShipmentRequest.ts +25 -3
- package/src/models/CreateShipmentRequestCarrierSettings.ts +1 -1
- package/src/models/CreateShipmentRequestDroppoint.ts +100 -0
- package/src/models/CreateShipmentRequestParcelsInnerOrderLinesInner.ts +3 -4
- package/src/models/GetOrder200ResponseShipmentsInner.ts +8 -0
- package/src/models/ListApiTokens401Response.ts +1 -0
- package/src/models/SendShipment422Response.ts +1 -0
- package/src/models/UpdateShipmentRequest.ts +25 -10
- package/src/models/UpdateShipmentRequestCarrierSettings.ts +101 -0
- package/src/models/UpdateShipmentRequestDroppoint.ts +100 -0
- package/src/models/index.ts +3 -0
|
@@ -137,12 +137,12 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
|
|
|
137
137
|
*/
|
|
138
138
|
createShipmentRequestOpts(requestParameters: CreateShipmentOperationRequest): Promise<runtime.RequestOpts>;
|
|
139
139
|
/**
|
|
140
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
140
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
141
141
|
* Create shipment
|
|
142
142
|
*/
|
|
143
143
|
createShipmentRaw(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>>;
|
|
144
144
|
/**
|
|
145
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
145
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
146
146
|
* Create shipment
|
|
147
147
|
*/
|
|
148
148
|
createShipment(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response>;
|
|
@@ -237,7 +237,7 @@ class ShipmentsApi extends runtime.BaseAPI {
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
240
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
241
241
|
* Create shipment
|
|
242
242
|
*/
|
|
243
243
|
createShipmentRaw(requestParameters, initOverrides) {
|
|
@@ -248,7 +248,7 @@ class ShipmentsApi extends runtime.BaseAPI {
|
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
251
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
252
252
|
* Create shipment
|
|
253
253
|
*/
|
|
254
254
|
createShipment(requestParameters, initOverrides) {
|
|
@@ -137,12 +137,12 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
|
|
|
137
137
|
*/
|
|
138
138
|
createShipmentRequestOpts(requestParameters: CreateShipmentOperationRequest): Promise<runtime.RequestOpts>;
|
|
139
139
|
/**
|
|
140
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
140
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
141
141
|
* Create shipment
|
|
142
142
|
*/
|
|
143
143
|
createShipmentRaw(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>>;
|
|
144
144
|
/**
|
|
145
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
145
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
146
146
|
* Create shipment
|
|
147
147
|
*/
|
|
148
148
|
createShipment(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response>;
|
|
@@ -234,7 +234,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
|
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
237
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
238
238
|
* Create shipment
|
|
239
239
|
*/
|
|
240
240
|
createShipmentRaw(requestParameters, initOverrides) {
|
|
@@ -245,7 +245,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
|
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
248
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
249
249
|
* Create shipment
|
|
250
250
|
*/
|
|
251
251
|
createShipment(requestParameters, initOverrides) {
|
|
@@ -123,6 +123,7 @@ export declare const BatchSendShipments200ResponseResultsInnerCodeEnum: {
|
|
|
123
123
|
readonly ShipmentDocumentNotFound: "SHIPMENT_DOCUMENT_NOT_FOUND";
|
|
124
124
|
readonly ShipmentAlreadySent: "SHIPMENT_ALREADY_SENT";
|
|
125
125
|
readonly ShipmentInvalidState: "SHIPMENT_INVALID_STATE";
|
|
126
|
+
readonly ShipmentServicePointRequired: "SHIPMENT_SERVICE_POINT_REQUIRED";
|
|
126
127
|
readonly ParcelNotFound: "PARCEL_NOT_FOUND";
|
|
127
128
|
readonly ParcelInvalidSplit: "PARCEL_INVALID_SPLIT";
|
|
128
129
|
readonly PickupNotFound: "PICKUP_NOT_FOUND";
|
|
@@ -87,6 +87,7 @@ export const BatchSendShipments200ResponseResultsInnerCodeEnum = {
|
|
|
87
87
|
ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
|
|
88
88
|
ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
|
|
89
89
|
ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
|
|
90
|
+
ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
|
|
90
91
|
ParcelNotFound: 'PARCEL_NOT_FOUND',
|
|
91
92
|
ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
|
|
92
93
|
PickupNotFound: 'PICKUP_NOT_FOUND',
|
|
@@ -22,11 +22,11 @@ export interface CreateShipment201ResponseParcelsInnerOrderLinesInner {
|
|
|
22
22
|
*/
|
|
23
23
|
id?: string;
|
|
24
24
|
/**
|
|
25
|
-
* Stock keeping unit of the product.
|
|
25
|
+
* Stock keeping unit of the product. Optional — not every webshop assigns SKUs.
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof CreateShipment201ResponseParcelsInnerOrderLinesInner
|
|
28
28
|
*/
|
|
29
|
-
sku
|
|
29
|
+
sku?: string | null;
|
|
30
30
|
/**
|
|
31
31
|
* Number of units in this order line.
|
|
32
32
|
* @type {number}
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
* Check if a given object implements the CreateShipment201ResponseParcelsInnerOrderLinesInner interface.
|
|
16
16
|
*/
|
|
17
17
|
export function instanceOfCreateShipment201ResponseParcelsInnerOrderLinesInner(value) {
|
|
18
|
-
if (!('sku' in value) || value['sku'] === undefined)
|
|
19
|
-
return false;
|
|
20
18
|
if (!('quantity' in value) || value['quantity'] === undefined)
|
|
21
19
|
return false;
|
|
22
20
|
return true;
|
|
@@ -30,7 +28,7 @@ export function CreateShipment201ResponseParcelsInnerOrderLinesInnerFromJSONType
|
|
|
30
28
|
}
|
|
31
29
|
return {
|
|
32
30
|
'id': json['id'] == null ? undefined : json['id'],
|
|
33
|
-
'sku': json['sku'],
|
|
31
|
+
'sku': json['sku'] === undefined ? undefined : json['sku'] === null ? null : json['sku'],
|
|
34
32
|
'quantity': json['quantity'],
|
|
35
33
|
'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'],
|
|
36
34
|
'unitPrice': json['unitPrice'] === undefined ? undefined : json['unitPrice'] === null ? null : json['unitPrice'],
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { CreateShipmentRequestPickupDetails } from './CreateShipmentRequestPickupDetails';
|
|
13
13
|
import type { CreateShipmentRequestCarrierSettings } from './CreateShipmentRequestCarrierSettings';
|
|
14
|
+
import type { CreateShipmentRequestDroppoint } from './CreateShipmentRequestDroppoint';
|
|
14
15
|
import type { CreateShipmentRequestPartiesInner } from './CreateShipmentRequestPartiesInner';
|
|
15
16
|
import type { CreateShipmentRequestParcelsInner } from './CreateShipmentRequestParcelsInner';
|
|
16
17
|
/**
|
|
@@ -54,7 +55,7 @@ export interface CreateShipmentRequest {
|
|
|
54
55
|
* @type {CreateShipmentRequestCarrierSettings}
|
|
55
56
|
* @memberof CreateShipmentRequest
|
|
56
57
|
*/
|
|
57
|
-
carrierSettings
|
|
58
|
+
carrierSettings?: CreateShipmentRequestCarrierSettings;
|
|
58
59
|
/**
|
|
59
60
|
* Parcels to include. Optional when orderId is provided.
|
|
60
61
|
* @type {Array<CreateShipmentRequestParcelsInner>}
|
|
@@ -97,6 +98,18 @@ export interface CreateShipmentRequest {
|
|
|
97
98
|
* @memberof CreateShipmentRequest
|
|
98
99
|
*/
|
|
99
100
|
documentPrinterId?: string | null;
|
|
101
|
+
/**
|
|
102
|
+
* Create the shipment from this shipping rule: carrier settings and the sender address derive from the rule (explicit carrierSettings and addressId are then ignored).
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof CreateShipmentRequest
|
|
105
|
+
*/
|
|
106
|
+
shippingRuleId?: string;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @type {CreateShipmentRequestDroppoint}
|
|
110
|
+
* @memberof CreateShipmentRequest
|
|
111
|
+
*/
|
|
112
|
+
droppoint?: CreateShipmentRequestDroppoint;
|
|
100
113
|
}
|
|
101
114
|
/**
|
|
102
115
|
* @export
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { CreateShipmentRequestPickupDetailsFromJSON, CreateShipmentRequestPickupDetailsToJSON, } from './CreateShipmentRequestPickupDetails';
|
|
15
15
|
import { CreateShipmentRequestCarrierSettingsFromJSON, CreateShipmentRequestCarrierSettingsToJSON, } from './CreateShipmentRequestCarrierSettings';
|
|
16
|
+
import { CreateShipmentRequestDroppointFromJSON, CreateShipmentRequestDroppointToJSON, } from './CreateShipmentRequestDroppoint';
|
|
16
17
|
import { CreateShipmentRequestPartiesInnerFromJSON, CreateShipmentRequestPartiesInnerToJSON, } from './CreateShipmentRequestPartiesInner';
|
|
17
18
|
import { CreateShipmentRequestParcelsInnerFromJSON, CreateShipmentRequestParcelsInnerToJSON, } from './CreateShipmentRequestParcelsInner';
|
|
18
19
|
/**
|
|
@@ -41,8 +42,6 @@ export const CreateShipmentRequestStatusEnum = {
|
|
|
41
42
|
export function instanceOfCreateShipmentRequest(value) {
|
|
42
43
|
if (!('type' in value) || value['type'] === undefined)
|
|
43
44
|
return false;
|
|
44
|
-
if (!('carrierSettings' in value) || value['carrierSettings'] === undefined)
|
|
45
|
-
return false;
|
|
46
45
|
return true;
|
|
47
46
|
}
|
|
48
47
|
export function CreateShipmentRequestFromJSON(json) {
|
|
@@ -58,7 +57,7 @@ export function CreateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
58
57
|
'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
|
|
59
58
|
'parties': json['parties'] == null ? undefined : (json['parties'].map(CreateShipmentRequestPartiesInnerFromJSON)),
|
|
60
59
|
'type': json['type'],
|
|
61
|
-
'carrierSettings': CreateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
|
|
60
|
+
'carrierSettings': json['carrierSettings'] == null ? undefined : CreateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
|
|
62
61
|
'parcels': json['parcels'] == null ? undefined : (json['parcels'].map(CreateShipmentRequestParcelsInnerFromJSON)),
|
|
63
62
|
'pickupDetails': json['pickupDetails'] === undefined ? undefined : json['pickupDetails'] === null ? null : CreateShipmentRequestPickupDetailsFromJSON(json['pickupDetails']),
|
|
64
63
|
'termOfTrade': json['termOfTrade'] == null ? undefined : json['termOfTrade'],
|
|
@@ -66,6 +65,8 @@ export function CreateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
66
65
|
'orderId': json['orderId'] === undefined ? undefined : json['orderId'] === null ? null : json['orderId'],
|
|
67
66
|
'labelPrinterId': json['labelPrinterId'] === undefined ? undefined : json['labelPrinterId'] === null ? null : json['labelPrinterId'],
|
|
68
67
|
'documentPrinterId': json['documentPrinterId'] === undefined ? undefined : json['documentPrinterId'] === null ? null : json['documentPrinterId'],
|
|
68
|
+
'shippingRuleId': json['shippingRuleId'] == null ? undefined : json['shippingRuleId'],
|
|
69
|
+
'droppoint': json['droppoint'] == null ? undefined : CreateShipmentRequestDroppointFromJSON(json['droppoint']),
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
72
|
export function CreateShipmentRequestToJSON(json) {
|
|
@@ -89,5 +90,7 @@ export function CreateShipmentRequestToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
89
90
|
'orderId': value['orderId'],
|
|
90
91
|
'labelPrinterId': value['labelPrinterId'],
|
|
91
92
|
'documentPrinterId': value['documentPrinterId'],
|
|
93
|
+
'shippingRuleId': value['shippingRuleId'],
|
|
94
|
+
'droppoint': CreateShipmentRequestDroppointToJSON(value['droppoint']),
|
|
92
95
|
};
|
|
93
96
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { CreateShippingRuleRequestAdditionalParametersValue } from './CreateShippingRuleRequestAdditionalParametersValue';
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Carrier configuration for the shipment. Optional when shippingRuleId is provided.
|
|
15
15
|
* @export
|
|
16
16
|
* @interface CreateShipmentRequestCarrierSettings
|
|
17
17
|
*/
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zippendo Public API
|
|
3
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@zippendo.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner } from './ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner';
|
|
13
|
+
/**
|
|
14
|
+
* Display details of the selected service point, stored alongside `servicePointId`. Used with a service-point shipping rule.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CreateShipmentRequestDroppoint
|
|
17
|
+
*/
|
|
18
|
+
export interface CreateShipmentRequestDroppoint {
|
|
19
|
+
/**
|
|
20
|
+
* Identifier of the selected service point.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof CreateShipmentRequestDroppoint
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Display name of the service point.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof CreateShipmentRequestDroppoint
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Formatted address of the service point.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof CreateShipmentRequestDroppoint
|
|
35
|
+
*/
|
|
36
|
+
address: string;
|
|
37
|
+
/**
|
|
38
|
+
* Latitude/longitude of the service point.
|
|
39
|
+
* @type {Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>}
|
|
40
|
+
* @memberof CreateShipmentRequestDroppoint
|
|
41
|
+
*/
|
|
42
|
+
coordinates?: Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the CreateShipmentRequestDroppoint interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfCreateShipmentRequestDroppoint(value: object): value is CreateShipmentRequestDroppoint;
|
|
48
|
+
export declare function CreateShipmentRequestDroppointFromJSON(json: any): CreateShipmentRequestDroppoint;
|
|
49
|
+
export declare function CreateShipmentRequestDroppointFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateShipmentRequestDroppoint;
|
|
50
|
+
export declare function CreateShipmentRequestDroppointToJSON(json: any): CreateShipmentRequestDroppoint;
|
|
51
|
+
export declare function CreateShipmentRequestDroppointToJSONTyped(value?: CreateShipmentRequestDroppoint | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zippendo Public API
|
|
5
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zippendo.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON, ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON, } from './ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the CreateShipmentRequestDroppoint interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfCreateShipmentRequestDroppoint(value) {
|
|
19
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('address' in value) || value['address'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function CreateShipmentRequestDroppointFromJSON(json) {
|
|
28
|
+
return CreateShipmentRequestDroppointFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function CreateShipmentRequestDroppointFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'id': json['id'],
|
|
36
|
+
'name': json['name'],
|
|
37
|
+
'address': json['address'],
|
|
38
|
+
'coordinates': json['coordinates'] == null ? undefined : (json['coordinates'].map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function CreateShipmentRequestDroppointToJSON(json) {
|
|
42
|
+
return CreateShipmentRequestDroppointToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
export function CreateShipmentRequestDroppointToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'id': value['id'],
|
|
50
|
+
'name': value['name'],
|
|
51
|
+
'address': value['address'],
|
|
52
|
+
'coordinates': value['coordinates'] == null ? undefined : (value['coordinates'].map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON)),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -22,11 +22,11 @@ export interface CreateShipmentRequestParcelsInnerOrderLinesInner {
|
|
|
22
22
|
*/
|
|
23
23
|
id?: string;
|
|
24
24
|
/**
|
|
25
|
-
* Stock keeping unit of the product.
|
|
25
|
+
* Stock keeping unit of the product. Optional — not every webshop assigns SKUs.
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof CreateShipmentRequestParcelsInnerOrderLinesInner
|
|
28
28
|
*/
|
|
29
|
-
sku
|
|
29
|
+
sku?: string | null;
|
|
30
30
|
/**
|
|
31
31
|
* Number of units in this order line.
|
|
32
32
|
* @type {number}
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
* Check if a given object implements the CreateShipmentRequestParcelsInnerOrderLinesInner interface.
|
|
16
16
|
*/
|
|
17
17
|
export function instanceOfCreateShipmentRequestParcelsInnerOrderLinesInner(value) {
|
|
18
|
-
if (!('sku' in value) || value['sku'] === undefined)
|
|
19
|
-
return false;
|
|
20
18
|
if (!('quantity' in value) || value['quantity'] === undefined)
|
|
21
19
|
return false;
|
|
22
20
|
return true;
|
|
@@ -30,7 +28,7 @@ export function CreateShipmentRequestParcelsInnerOrderLinesInnerFromJSONTyped(js
|
|
|
30
28
|
}
|
|
31
29
|
return {
|
|
32
30
|
'id': json['id'] == null ? undefined : json['id'],
|
|
33
|
-
'sku': json['sku'],
|
|
31
|
+
'sku': json['sku'] === undefined ? undefined : json['sku'] === null ? null : json['sku'],
|
|
34
32
|
'quantity': json['quantity'],
|
|
35
33
|
'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'],
|
|
36
34
|
'unitPrice': json['unitPrice'] === undefined ? undefined : json['unitPrice'] === null ? null : json['unitPrice'],
|
|
@@ -54,6 +54,12 @@ export interface GetOrder200ResponseShipmentsInner {
|
|
|
54
54
|
* @memberof GetOrder200ResponseShipmentsInner
|
|
55
55
|
*/
|
|
56
56
|
carrierSettings: ListShipments200ResponseDataInnerCarrierSettings;
|
|
57
|
+
/**
|
|
58
|
+
* Selected carrier service point identifier.
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof GetOrder200ResponseShipmentsInner
|
|
61
|
+
*/
|
|
62
|
+
servicePointId?: string | null;
|
|
57
63
|
/**
|
|
58
64
|
* Timestamp when the shipment was created.
|
|
59
65
|
* @type {string}
|
|
@@ -68,6 +68,7 @@ export function GetOrder200ResponseShipmentsInnerFromJSONTyped(json, ignoreDiscr
|
|
|
68
68
|
'type': json['type'],
|
|
69
69
|
'tracking': json['tracking'] === undefined ? undefined : json['tracking'] === null ? null : CreateShipment201ResponseTrackingFromJSON(json['tracking']),
|
|
70
70
|
'carrierSettings': ListShipments200ResponseDataInnerCarrierSettingsFromJSON(json['carrierSettings']),
|
|
71
|
+
'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
|
|
71
72
|
'createdAt': json['createdAt'],
|
|
72
73
|
'updatedAt': json['updatedAt'],
|
|
73
74
|
'shippingRuleId': json['shippingRuleId'] === undefined ? undefined : json['shippingRuleId'] === null ? null : json['shippingRuleId'],
|
|
@@ -88,6 +89,7 @@ export function GetOrder200ResponseShipmentsInnerToJSONTyped(value, ignoreDiscri
|
|
|
88
89
|
'type': value['type'],
|
|
89
90
|
'tracking': CreateShipment201ResponseTrackingToJSON(value['tracking']),
|
|
90
91
|
'carrierSettings': ListShipments200ResponseDataInnerCarrierSettingsToJSON(value['carrierSettings']),
|
|
92
|
+
'servicePointId': value['servicePointId'],
|
|
91
93
|
'createdAt': value['createdAt'],
|
|
92
94
|
'updatedAt': value['updatedAt'],
|
|
93
95
|
'shippingRuleId': value['shippingRuleId'],
|
|
@@ -102,6 +102,7 @@ export declare const ListApiTokens401ResponseCodeEnum: {
|
|
|
102
102
|
readonly ShipmentDocumentNotFound: "SHIPMENT_DOCUMENT_NOT_FOUND";
|
|
103
103
|
readonly ShipmentAlreadySent: "SHIPMENT_ALREADY_SENT";
|
|
104
104
|
readonly ShipmentInvalidState: "SHIPMENT_INVALID_STATE";
|
|
105
|
+
readonly ShipmentServicePointRequired: "SHIPMENT_SERVICE_POINT_REQUIRED";
|
|
105
106
|
readonly ParcelNotFound: "PARCEL_NOT_FOUND";
|
|
106
107
|
readonly ParcelInvalidSplit: "PARCEL_INVALID_SPLIT";
|
|
107
108
|
readonly PickupNotFound: "PICKUP_NOT_FOUND";
|
|
@@ -79,6 +79,7 @@ export const ListApiTokens401ResponseCodeEnum = {
|
|
|
79
79
|
ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
|
|
80
80
|
ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
|
|
81
81
|
ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
|
|
82
|
+
ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
|
|
82
83
|
ParcelNotFound: 'PARCEL_NOT_FOUND',
|
|
83
84
|
ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
|
|
84
85
|
PickupNotFound: 'PICKUP_NOT_FOUND',
|
|
@@ -109,6 +109,7 @@ export declare const SendShipment422ResponseCodeEnum: {
|
|
|
109
109
|
readonly ShipmentDocumentNotFound: "SHIPMENT_DOCUMENT_NOT_FOUND";
|
|
110
110
|
readonly ShipmentAlreadySent: "SHIPMENT_ALREADY_SENT";
|
|
111
111
|
readonly ShipmentInvalidState: "SHIPMENT_INVALID_STATE";
|
|
112
|
+
readonly ShipmentServicePointRequired: "SHIPMENT_SERVICE_POINT_REQUIRED";
|
|
112
113
|
readonly ParcelNotFound: "PARCEL_NOT_FOUND";
|
|
113
114
|
readonly ParcelInvalidSplit: "PARCEL_INVALID_SPLIT";
|
|
114
115
|
readonly PickupNotFound: "PICKUP_NOT_FOUND";
|
|
@@ -80,6 +80,7 @@ export const SendShipment422ResponseCodeEnum = {
|
|
|
80
80
|
ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
|
|
81
81
|
ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
|
|
82
82
|
ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
|
|
83
|
+
ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
|
|
83
84
|
ParcelNotFound: 'PARCEL_NOT_FOUND',
|
|
84
85
|
ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
|
|
85
86
|
PickupNotFound: 'PICKUP_NOT_FOUND',
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { CreateShipmentRequestPickupDetails } from './CreateShipmentRequestPickupDetails';
|
|
13
|
-
import type {
|
|
13
|
+
import type { UpdateShipmentRequestDroppoint } from './UpdateShipmentRequestDroppoint';
|
|
14
14
|
import type { CreateShipmentRequestPartiesInner } from './CreateShipmentRequestPartiesInner';
|
|
15
|
+
import type { UpdateShipmentRequestCarrierSettings } from './UpdateShipmentRequestCarrierSettings';
|
|
15
16
|
import type { CreateShipmentRequestParcelsInner } from './CreateShipmentRequestParcelsInner';
|
|
16
17
|
/**
|
|
17
18
|
*
|
|
@@ -51,10 +52,10 @@ export interface UpdateShipmentRequest {
|
|
|
51
52
|
type?: UpdateShipmentRequestTypeEnum;
|
|
52
53
|
/**
|
|
53
54
|
*
|
|
54
|
-
* @type {
|
|
55
|
+
* @type {UpdateShipmentRequestCarrierSettings}
|
|
55
56
|
* @memberof UpdateShipmentRequest
|
|
56
57
|
*/
|
|
57
|
-
carrierSettings?:
|
|
58
|
+
carrierSettings?: UpdateShipmentRequestCarrierSettings;
|
|
58
59
|
/**
|
|
59
60
|
* Parcels to include. Optional when orderId is provided.
|
|
60
61
|
* @type {Array<CreateShipmentRequestParcelsInner>}
|
|
@@ -103,6 +104,12 @@ export interface UpdateShipmentRequest {
|
|
|
103
104
|
* @memberof UpdateShipmentRequest
|
|
104
105
|
*/
|
|
105
106
|
shippingRuleId?: string | null;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @type {UpdateShipmentRequestDroppoint}
|
|
110
|
+
* @memberof UpdateShipmentRequest
|
|
111
|
+
*/
|
|
112
|
+
droppoint?: UpdateShipmentRequestDroppoint;
|
|
106
113
|
}
|
|
107
114
|
/**
|
|
108
115
|
* @export
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { CreateShipmentRequestPickupDetailsFromJSON, CreateShipmentRequestPickupDetailsToJSON, } from './CreateShipmentRequestPickupDetails';
|
|
15
|
-
import {
|
|
15
|
+
import { UpdateShipmentRequestDroppointFromJSON, UpdateShipmentRequestDroppointToJSON, } from './UpdateShipmentRequestDroppoint';
|
|
16
16
|
import { CreateShipmentRequestPartiesInnerFromJSON, CreateShipmentRequestPartiesInnerToJSON, } from './CreateShipmentRequestPartiesInner';
|
|
17
|
+
import { UpdateShipmentRequestCarrierSettingsFromJSON, UpdateShipmentRequestCarrierSettingsToJSON, } from './UpdateShipmentRequestCarrierSettings';
|
|
17
18
|
import { CreateShipmentRequestParcelsInnerFromJSON, CreateShipmentRequestParcelsInnerToJSON, } from './CreateShipmentRequestParcelsInner';
|
|
18
19
|
/**
|
|
19
20
|
* @export
|
|
@@ -54,7 +55,7 @@ export function UpdateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
55
|
'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
|
|
55
56
|
'parties': json['parties'] == null ? undefined : (json['parties'].map(CreateShipmentRequestPartiesInnerFromJSON)),
|
|
56
57
|
'type': json['type'] == null ? undefined : json['type'],
|
|
57
|
-
'carrierSettings': json['carrierSettings'] == null ? undefined :
|
|
58
|
+
'carrierSettings': json['carrierSettings'] == null ? undefined : UpdateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
|
|
58
59
|
'parcels': json['parcels'] == null ? undefined : (json['parcels'].map(CreateShipmentRequestParcelsInnerFromJSON)),
|
|
59
60
|
'pickupDetails': json['pickupDetails'] === undefined ? undefined : json['pickupDetails'] === null ? null : CreateShipmentRequestPickupDetailsFromJSON(json['pickupDetails']),
|
|
60
61
|
'termOfTrade': json['termOfTrade'] == null ? undefined : json['termOfTrade'],
|
|
@@ -63,6 +64,7 @@ export function UpdateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
63
64
|
'labelPrinterId': json['labelPrinterId'] === undefined ? undefined : json['labelPrinterId'] === null ? null : json['labelPrinterId'],
|
|
64
65
|
'documentPrinterId': json['documentPrinterId'] === undefined ? undefined : json['documentPrinterId'] === null ? null : json['documentPrinterId'],
|
|
65
66
|
'shippingRuleId': json['shippingRuleId'] === undefined ? undefined : json['shippingRuleId'] === null ? null : json['shippingRuleId'],
|
|
67
|
+
'droppoint': json['droppoint'] == null ? undefined : UpdateShipmentRequestDroppointFromJSON(json['droppoint']),
|
|
66
68
|
};
|
|
67
69
|
}
|
|
68
70
|
export function UpdateShipmentRequestToJSON(json) {
|
|
@@ -78,7 +80,7 @@ export function UpdateShipmentRequestToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
78
80
|
'servicePointId': value['servicePointId'],
|
|
79
81
|
'parties': value['parties'] == null ? undefined : (value['parties'].map(CreateShipmentRequestPartiesInnerToJSON)),
|
|
80
82
|
'type': value['type'],
|
|
81
|
-
'carrierSettings':
|
|
83
|
+
'carrierSettings': UpdateShipmentRequestCarrierSettingsToJSON(value['carrierSettings']),
|
|
82
84
|
'parcels': value['parcels'] == null ? undefined : (value['parcels'].map(CreateShipmentRequestParcelsInnerToJSON)),
|
|
83
85
|
'pickupDetails': CreateShipmentRequestPickupDetailsToJSON(value['pickupDetails']),
|
|
84
86
|
'termOfTrade': value['termOfTrade'],
|
|
@@ -87,5 +89,6 @@ export function UpdateShipmentRequestToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
87
89
|
'labelPrinterId': value['labelPrinterId'],
|
|
88
90
|
'documentPrinterId': value['documentPrinterId'],
|
|
89
91
|
'shippingRuleId': value['shippingRuleId'],
|
|
92
|
+
'droppoint': UpdateShipmentRequestDroppointToJSON(value['droppoint']),
|
|
90
93
|
};
|
|
91
94
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zippendo Public API
|
|
3
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@zippendo.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { CreateShippingRuleRequestAdditionalParametersValue } from './CreateShippingRuleRequestAdditionalParametersValue';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UpdateShipmentRequestCarrierSettings
|
|
17
|
+
*/
|
|
18
|
+
export interface UpdateShipmentRequestCarrierSettings {
|
|
19
|
+
/**
|
|
20
|
+
* Identifier of the carrier to use.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
23
|
+
*/
|
|
24
|
+
carrierId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Identifier of the carrier product/service.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
29
|
+
*/
|
|
30
|
+
productId: string;
|
|
31
|
+
/**
|
|
32
|
+
* Additional service codes requested from the carrier.
|
|
33
|
+
* @type {Array<string>}
|
|
34
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
35
|
+
*/
|
|
36
|
+
services: Array<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Carrier-specific extra parameters as key/value pairs.
|
|
39
|
+
* @type {{ [key: string]: CreateShippingRuleRequestAdditionalParametersValue; }}
|
|
40
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
41
|
+
*/
|
|
42
|
+
additionalParameters: {
|
|
43
|
+
[key: string]: CreateShippingRuleRequestAdditionalParametersValue;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the UpdateShipmentRequestCarrierSettings interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfUpdateShipmentRequestCarrierSettings(value: object): value is UpdateShipmentRequestCarrierSettings;
|
|
50
|
+
export declare function UpdateShipmentRequestCarrierSettingsFromJSON(json: any): UpdateShipmentRequestCarrierSettings;
|
|
51
|
+
export declare function UpdateShipmentRequestCarrierSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateShipmentRequestCarrierSettings;
|
|
52
|
+
export declare function UpdateShipmentRequestCarrierSettingsToJSON(json: any): UpdateShipmentRequestCarrierSettings;
|
|
53
|
+
export declare function UpdateShipmentRequestCarrierSettingsToJSONTyped(value?: UpdateShipmentRequestCarrierSettings | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zippendo Public API
|
|
5
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zippendo.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { mapValues } from '../runtime';
|
|
15
|
+
import { CreateShippingRuleRequestAdditionalParametersValueFromJSON, CreateShippingRuleRequestAdditionalParametersValueToJSON, } from './CreateShippingRuleRequestAdditionalParametersValue';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the UpdateShipmentRequestCarrierSettings interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfUpdateShipmentRequestCarrierSettings(value) {
|
|
20
|
+
if (!('carrierId' in value) || value['carrierId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('productId' in value) || value['productId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('services' in value) || value['services'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('additionalParameters' in value) || value['additionalParameters'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
export function UpdateShipmentRequestCarrierSettingsFromJSON(json) {
|
|
31
|
+
return UpdateShipmentRequestCarrierSettingsFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
export function UpdateShipmentRequestCarrierSettingsFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'carrierId': json['carrierId'],
|
|
39
|
+
'productId': json['productId'],
|
|
40
|
+
'services': json['services'],
|
|
41
|
+
'additionalParameters': (mapValues(json['additionalParameters'], CreateShippingRuleRequestAdditionalParametersValueFromJSON)),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function UpdateShipmentRequestCarrierSettingsToJSON(json) {
|
|
45
|
+
return UpdateShipmentRequestCarrierSettingsToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
export function UpdateShipmentRequestCarrierSettingsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'carrierId': value['carrierId'],
|
|
53
|
+
'productId': value['productId'],
|
|
54
|
+
'services': value['services'],
|
|
55
|
+
'additionalParameters': (mapValues(value['additionalParameters'], CreateShippingRuleRequestAdditionalParametersValueToJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|