@zippendo/sdk 1.1.4 → 1.2.1
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 +6 -3
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.js +4 -1
- package/dist/esm/models/BatchSendShipments200ResponseSummary.d.ts +8 -2
- package/dist/esm/models/BatchSendShipments200ResponseSummary.js +4 -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 +2 -0
- package/dist/esm/models/ListApiTokens401Response.js +2 -0
- package/dist/esm/models/SendShipment422Response.d.ts +2 -0
- package/dist/esm/models/SendShipment422Response.js +2 -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 +6 -3
- package/dist/models/BatchSendShipments200ResponseResultsInner.js +4 -1
- package/dist/models/BatchSendShipments200ResponseSummary.d.ts +8 -2
- package/dist/models/BatchSendShipments200ResponseSummary.js +4 -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 +2 -0
- package/dist/models/ListApiTokens401Response.js +2 -0
- package/dist/models/SendShipment422Response.d.ts +2 -0
- package/dist/models/SendShipment422Response.js +2 -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/BatchSendShipments200ResponseSummary.md +2 -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 +7 -4
- package/src/models/BatchSendShipments200ResponseSummary.ts +11 -2
- 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 +2 -0
- package/src/models/SendShipment422Response.ts +2 -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
|
@@ -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
|
+
}
|
|
@@ -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 when applying a service-point shipping rule (whose parameters otherwise replace the stored droppoint).
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UpdateShipmentRequestDroppoint
|
|
17
|
+
*/
|
|
18
|
+
export interface UpdateShipmentRequestDroppoint {
|
|
19
|
+
/**
|
|
20
|
+
* Identifier of the selected service point.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UpdateShipmentRequestDroppoint
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Display name of the service point.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UpdateShipmentRequestDroppoint
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Formatted address of the service point.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UpdateShipmentRequestDroppoint
|
|
35
|
+
*/
|
|
36
|
+
address: string;
|
|
37
|
+
/**
|
|
38
|
+
* Latitude/longitude of the service point.
|
|
39
|
+
* @type {Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>}
|
|
40
|
+
* @memberof UpdateShipmentRequestDroppoint
|
|
41
|
+
*/
|
|
42
|
+
coordinates?: Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the UpdateShipmentRequestDroppoint interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfUpdateShipmentRequestDroppoint(value: object): value is UpdateShipmentRequestDroppoint;
|
|
48
|
+
export declare function UpdateShipmentRequestDroppointFromJSON(json: any): UpdateShipmentRequestDroppoint;
|
|
49
|
+
export declare function UpdateShipmentRequestDroppointFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateShipmentRequestDroppoint;
|
|
50
|
+
export declare function UpdateShipmentRequestDroppointToJSON(json: any): UpdateShipmentRequestDroppoint;
|
|
51
|
+
export declare function UpdateShipmentRequestDroppointToJSONTyped(value?: UpdateShipmentRequestDroppoint | 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 UpdateShipmentRequestDroppoint interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfUpdateShipmentRequestDroppoint(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 UpdateShipmentRequestDroppointFromJSON(json) {
|
|
28
|
+
return UpdateShipmentRequestDroppointFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function UpdateShipmentRequestDroppointFromJSONTyped(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 UpdateShipmentRequestDroppointToJSON(json) {
|
|
42
|
+
return UpdateShipmentRequestDroppointToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
export function UpdateShipmentRequestDroppointToJSONTyped(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
|
+
}
|
|
@@ -35,6 +35,7 @@ export * from './CreateShipment201ResponseShippingRule';
|
|
|
35
35
|
export * from './CreateShipment201ResponseTracking';
|
|
36
36
|
export * from './CreateShipmentRequest';
|
|
37
37
|
export * from './CreateShipmentRequestCarrierSettings';
|
|
38
|
+
export * from './CreateShipmentRequestDroppoint';
|
|
38
39
|
export * from './CreateShipmentRequestParcelsInner';
|
|
39
40
|
export * from './CreateShipmentRequestParcelsInnerDimensions';
|
|
40
41
|
export * from './CreateShipmentRequestParcelsInnerOrderLinesInner';
|
|
@@ -141,6 +142,8 @@ export * from './UpdateOrgBrandingRequest';
|
|
|
141
142
|
export * from './UpdateOrgRequest';
|
|
142
143
|
export * from './UpdateOrgWebhookRequest';
|
|
143
144
|
export * from './UpdateShipmentRequest';
|
|
145
|
+
export * from './UpdateShipmentRequestCarrierSettings';
|
|
146
|
+
export * from './UpdateShipmentRequestDroppoint';
|
|
144
147
|
export * from './UpdateShippingRuleRequest';
|
|
145
148
|
export * from './VerifyApiToken200Response';
|
|
146
149
|
export * from './VerifyApiTokenRequest';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export * from './CreateShipment201ResponseShippingRule';
|
|
|
37
37
|
export * from './CreateShipment201ResponseTracking';
|
|
38
38
|
export * from './CreateShipmentRequest';
|
|
39
39
|
export * from './CreateShipmentRequestCarrierSettings';
|
|
40
|
+
export * from './CreateShipmentRequestDroppoint';
|
|
40
41
|
export * from './CreateShipmentRequestParcelsInner';
|
|
41
42
|
export * from './CreateShipmentRequestParcelsInnerDimensions';
|
|
42
43
|
export * from './CreateShipmentRequestParcelsInnerOrderLinesInner';
|
|
@@ -143,6 +144,8 @@ export * from './UpdateOrgBrandingRequest';
|
|
|
143
144
|
export * from './UpdateOrgRequest';
|
|
144
145
|
export * from './UpdateOrgWebhookRequest';
|
|
145
146
|
export * from './UpdateShipmentRequest';
|
|
147
|
+
export * from './UpdateShipmentRequestCarrierSettings';
|
|
148
|
+
export * from './UpdateShipmentRequestDroppoint';
|
|
146
149
|
export * from './UpdateShippingRuleRequest';
|
|
147
150
|
export * from './VerifyApiToken200Response';
|
|
148
151
|
export * from './VerifyApiTokenRequest';
|
|
@@ -23,19 +23,19 @@ export interface BatchSendShipments200ResponseResultsInner {
|
|
|
23
23
|
*/
|
|
24
24
|
shipmentId: string;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* `sent` when the carrier booked it, `failed` when the carrier or Zippendo rejected it, and `skipped` when the batch ran out of time before reaching it. A `skipped` shipment was never sent to the carrier and is safe to submit again.
|
|
27
27
|
* @type {BatchSendShipments200ResponseResultsInnerStatusEnum}
|
|
28
28
|
* @memberof BatchSendShipments200ResponseResultsInner
|
|
29
29
|
*/
|
|
30
30
|
status: BatchSendShipments200ResponseResultsInnerStatusEnum;
|
|
31
31
|
/**
|
|
32
|
-
* Canonical machine-readable error code, present when `status` is `failed`.
|
|
32
|
+
* Canonical machine-readable error code, present when `status` is `failed` or `skipped`.
|
|
33
33
|
* @type {BatchSendShipments200ResponseResultsInnerCodeEnum}
|
|
34
34
|
* @memberof BatchSendShipments200ResponseResultsInner
|
|
35
35
|
*/
|
|
36
36
|
code?: BatchSendShipments200ResponseResultsInnerCodeEnum;
|
|
37
37
|
/**
|
|
38
|
-
* Human-readable
|
|
38
|
+
* Human-readable detail, present when `status` is `failed` or `skipped`.
|
|
39
39
|
* @type {string}
|
|
40
40
|
* @memberof BatchSendShipments200ResponseResultsInner
|
|
41
41
|
*/
|
|
@@ -53,6 +53,7 @@ export interface BatchSendShipments200ResponseResultsInner {
|
|
|
53
53
|
export declare const BatchSendShipments200ResponseResultsInnerStatusEnum: {
|
|
54
54
|
readonly Sent: "sent";
|
|
55
55
|
readonly Failed: "failed";
|
|
56
|
+
readonly Skipped: "skipped";
|
|
56
57
|
};
|
|
57
58
|
export type BatchSendShipments200ResponseResultsInnerStatusEnum = typeof BatchSendShipments200ResponseResultsInnerStatusEnum[keyof typeof BatchSendShipments200ResponseResultsInnerStatusEnum];
|
|
58
59
|
/**
|
|
@@ -123,6 +124,8 @@ export declare const BatchSendShipments200ResponseResultsInnerCodeEnum: {
|
|
|
123
124
|
readonly ShipmentDocumentNotFound: "SHIPMENT_DOCUMENT_NOT_FOUND";
|
|
124
125
|
readonly ShipmentAlreadySent: "SHIPMENT_ALREADY_SENT";
|
|
125
126
|
readonly ShipmentInvalidState: "SHIPMENT_INVALID_STATE";
|
|
127
|
+
readonly ShipmentServicePointRequired: "SHIPMENT_SERVICE_POINT_REQUIRED";
|
|
128
|
+
readonly ShipmentSendNotAttempted: "SHIPMENT_SEND_NOT_ATTEMPTED";
|
|
126
129
|
readonly ParcelNotFound: "PARCEL_NOT_FOUND";
|
|
127
130
|
readonly ParcelInvalidSplit: "PARCEL_INVALID_SPLIT";
|
|
128
131
|
readonly PickupNotFound: "PICKUP_NOT_FOUND";
|
|
@@ -25,7 +25,8 @@ const SendShipment422ResponseErrorsInner_1 = require("./SendShipment422ResponseE
|
|
|
25
25
|
*/
|
|
26
26
|
exports.BatchSendShipments200ResponseResultsInnerStatusEnum = {
|
|
27
27
|
Sent: 'sent',
|
|
28
|
-
Failed: 'failed'
|
|
28
|
+
Failed: 'failed',
|
|
29
|
+
Skipped: 'skipped'
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
31
32
|
* @export
|
|
@@ -95,6 +96,8 @@ exports.BatchSendShipments200ResponseResultsInnerCodeEnum = {
|
|
|
95
96
|
ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
|
|
96
97
|
ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
|
|
97
98
|
ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
|
|
99
|
+
ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
|
|
100
|
+
ShipmentSendNotAttempted: 'SHIPMENT_SEND_NOT_ATTEMPTED',
|
|
98
101
|
ParcelNotFound: 'PARCEL_NOT_FOUND',
|
|
99
102
|
ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
|
|
100
103
|
PickupNotFound: 'PICKUP_NOT_FOUND',
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface BatchSendShipments200ResponseSummary {
|
|
18
18
|
/**
|
|
19
|
-
* Number of unique shipments
|
|
19
|
+
* Number of unique shipments requested.
|
|
20
20
|
* @type {number}
|
|
21
21
|
* @memberof BatchSendShipments200ResponseSummary
|
|
22
22
|
*/
|
|
@@ -28,11 +28,17 @@ export interface BatchSendShipments200ResponseSummary {
|
|
|
28
28
|
*/
|
|
29
29
|
sent: number;
|
|
30
30
|
/**
|
|
31
|
-
* How many
|
|
31
|
+
* How many the carrier or Zippendo rejected.
|
|
32
32
|
* @type {number}
|
|
33
33
|
* @memberof BatchSendShipments200ResponseSummary
|
|
34
34
|
*/
|
|
35
35
|
failed: number;
|
|
36
|
+
/**
|
|
37
|
+
* How many the batch ran out of time to attempt. Submit these again.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof BatchSendShipments200ResponseSummary
|
|
40
|
+
*/
|
|
41
|
+
skipped: number;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* Check if a given object implements the BatchSendShipments200ResponseSummary interface.
|
|
@@ -28,6 +28,8 @@ function instanceOfBatchSendShipments200ResponseSummary(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('failed' in value) || value['failed'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('skipped' in value) || value['skipped'] === undefined)
|
|
32
|
+
return false;
|
|
31
33
|
return true;
|
|
32
34
|
}
|
|
33
35
|
function BatchSendShipments200ResponseSummaryFromJSON(json) {
|
|
@@ -41,6 +43,7 @@ function BatchSendShipments200ResponseSummaryFromJSONTyped(json, ignoreDiscrimin
|
|
|
41
43
|
'total': json['total'],
|
|
42
44
|
'sent': json['sent'],
|
|
43
45
|
'failed': json['failed'],
|
|
46
|
+
'skipped': json['skipped'],
|
|
44
47
|
};
|
|
45
48
|
}
|
|
46
49
|
function BatchSendShipments200ResponseSummaryToJSON(json) {
|
|
@@ -54,5 +57,6 @@ function BatchSendShipments200ResponseSummaryToJSONTyped(value, ignoreDiscrimina
|
|
|
54
57
|
'total': value['total'],
|
|
55
58
|
'sent': value['sent'],
|
|
56
59
|
'failed': value['failed'],
|
|
60
|
+
'skipped': value['skipped'],
|
|
57
61
|
};
|
|
58
62
|
}
|
|
@@ -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}
|
|
@@ -22,8 +22,6 @@ exports.CreateShipment201ResponseParcelsInnerOrderLinesInnerToJSONTyped = Create
|
|
|
22
22
|
* Check if a given object implements the CreateShipment201ResponseParcelsInnerOrderLinesInner interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfCreateShipment201ResponseParcelsInnerOrderLinesInner(value) {
|
|
25
|
-
if (!('sku' in value) || value['sku'] === undefined)
|
|
26
|
-
return false;
|
|
27
25
|
if (!('quantity' in value) || value['quantity'] === undefined)
|
|
28
26
|
return false;
|
|
29
27
|
return true;
|
|
@@ -37,7 +35,7 @@ function CreateShipment201ResponseParcelsInnerOrderLinesInnerFromJSONTyped(json,
|
|
|
37
35
|
}
|
|
38
36
|
return {
|
|
39
37
|
'id': json['id'] == null ? undefined : json['id'],
|
|
40
|
-
'sku': json['sku'],
|
|
38
|
+
'sku': json['sku'] === undefined ? undefined : json['sku'] === null ? null : json['sku'],
|
|
41
39
|
'quantity': json['quantity'],
|
|
42
40
|
'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'],
|
|
43
41
|
'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
|
|
@@ -21,6 +21,7 @@ exports.CreateShipmentRequestToJSON = CreateShipmentRequestToJSON;
|
|
|
21
21
|
exports.CreateShipmentRequestToJSONTyped = CreateShipmentRequestToJSONTyped;
|
|
22
22
|
const CreateShipmentRequestPickupDetails_1 = require("./CreateShipmentRequestPickupDetails");
|
|
23
23
|
const CreateShipmentRequestCarrierSettings_1 = require("./CreateShipmentRequestCarrierSettings");
|
|
24
|
+
const CreateShipmentRequestDroppoint_1 = require("./CreateShipmentRequestDroppoint");
|
|
24
25
|
const CreateShipmentRequestPartiesInner_1 = require("./CreateShipmentRequestPartiesInner");
|
|
25
26
|
const CreateShipmentRequestParcelsInner_1 = require("./CreateShipmentRequestParcelsInner");
|
|
26
27
|
/**
|
|
@@ -49,8 +50,6 @@ exports.CreateShipmentRequestStatusEnum = {
|
|
|
49
50
|
function instanceOfCreateShipmentRequest(value) {
|
|
50
51
|
if (!('type' in value) || value['type'] === undefined)
|
|
51
52
|
return false;
|
|
52
|
-
if (!('carrierSettings' in value) || value['carrierSettings'] === undefined)
|
|
53
|
-
return false;
|
|
54
53
|
return true;
|
|
55
54
|
}
|
|
56
55
|
function CreateShipmentRequestFromJSON(json) {
|
|
@@ -66,7 +65,7 @@ function CreateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
66
65
|
'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
|
|
67
66
|
'parties': json['parties'] == null ? undefined : (json['parties'].map(CreateShipmentRequestPartiesInner_1.CreateShipmentRequestPartiesInnerFromJSON)),
|
|
68
67
|
'type': json['type'],
|
|
69
|
-
'carrierSettings': (0, CreateShipmentRequestCarrierSettings_1.CreateShipmentRequestCarrierSettingsFromJSON)(json['carrierSettings']),
|
|
68
|
+
'carrierSettings': json['carrierSettings'] == null ? undefined : (0, CreateShipmentRequestCarrierSettings_1.CreateShipmentRequestCarrierSettingsFromJSON)(json['carrierSettings']),
|
|
70
69
|
'parcels': json['parcels'] == null ? undefined : (json['parcels'].map(CreateShipmentRequestParcelsInner_1.CreateShipmentRequestParcelsInnerFromJSON)),
|
|
71
70
|
'pickupDetails': json['pickupDetails'] === undefined ? undefined : json['pickupDetails'] === null ? null : (0, CreateShipmentRequestPickupDetails_1.CreateShipmentRequestPickupDetailsFromJSON)(json['pickupDetails']),
|
|
72
71
|
'termOfTrade': json['termOfTrade'] == null ? undefined : json['termOfTrade'],
|
|
@@ -74,6 +73,8 @@ function CreateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
74
73
|
'orderId': json['orderId'] === undefined ? undefined : json['orderId'] === null ? null : json['orderId'],
|
|
75
74
|
'labelPrinterId': json['labelPrinterId'] === undefined ? undefined : json['labelPrinterId'] === null ? null : json['labelPrinterId'],
|
|
76
75
|
'documentPrinterId': json['documentPrinterId'] === undefined ? undefined : json['documentPrinterId'] === null ? null : json['documentPrinterId'],
|
|
76
|
+
'shippingRuleId': json['shippingRuleId'] == null ? undefined : json['shippingRuleId'],
|
|
77
|
+
'droppoint': json['droppoint'] == null ? undefined : (0, CreateShipmentRequestDroppoint_1.CreateShipmentRequestDroppointFromJSON)(json['droppoint']),
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
80
|
function CreateShipmentRequestToJSON(json) {
|
|
@@ -97,5 +98,7 @@ function CreateShipmentRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
97
98
|
'orderId': value['orderId'],
|
|
98
99
|
'labelPrinterId': value['labelPrinterId'],
|
|
99
100
|
'documentPrinterId': value['documentPrinterId'],
|
|
101
|
+
'shippingRuleId': value['shippingRuleId'],
|
|
102
|
+
'droppoint': (0, CreateShipmentRequestDroppoint_1.CreateShipmentRequestDroppointToJSON)(value['droppoint']),
|
|
100
103
|
};
|
|
101
104
|
}
|
|
@@ -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,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Zippendo Public API
|
|
6
|
+
* 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`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@zippendo.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfCreateShipmentRequestDroppoint = instanceOfCreateShipmentRequestDroppoint;
|
|
17
|
+
exports.CreateShipmentRequestDroppointFromJSON = CreateShipmentRequestDroppointFromJSON;
|
|
18
|
+
exports.CreateShipmentRequestDroppointFromJSONTyped = CreateShipmentRequestDroppointFromJSONTyped;
|
|
19
|
+
exports.CreateShipmentRequestDroppointToJSON = CreateShipmentRequestDroppointToJSON;
|
|
20
|
+
exports.CreateShipmentRequestDroppointToJSONTyped = CreateShipmentRequestDroppointToJSONTyped;
|
|
21
|
+
const ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner_1 = require("./ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the CreateShipmentRequestDroppoint interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfCreateShipmentRequestDroppoint(value) {
|
|
26
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('address' in value) || value['address'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function CreateShipmentRequestDroppointFromJSON(json) {
|
|
35
|
+
return CreateShipmentRequestDroppointFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function CreateShipmentRequestDroppointFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'id': json['id'],
|
|
43
|
+
'name': json['name'],
|
|
44
|
+
'address': json['address'],
|
|
45
|
+
'coordinates': json['coordinates'] == null ? undefined : (json['coordinates'].map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner_1.ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON)),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function CreateShipmentRequestDroppointToJSON(json) {
|
|
49
|
+
return CreateShipmentRequestDroppointToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function CreateShipmentRequestDroppointToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'id': value['id'],
|
|
57
|
+
'name': value['name'],
|
|
58
|
+
'address': value['address'],
|
|
59
|
+
'coordinates': value['coordinates'] == null ? undefined : (value['coordinates'].map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner_1.ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON)),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -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}
|