docs
  1. SCAYLE Resource Center
  2. Developer Guides
  3. Logistics
  4. Cross Docking

Cross Docking

General

Package groups can be used for cross-docking purposes. SCAYLE will take care of delegating cross-docking orders to the correct warehouse.

Admin API

Assign a package group

Learn how to assign a package group to a list of shop warehouses.

When working with shop warehouses you can bulk assign a package group to all warehouses for a specific shop.

This method is used to assign a package group to a list of shop warehouses by providing a collection of shop warehouse identifiers.

This method supports partial updates and therefore will only assign the package group to the provided warehouses.

adminApi.apis.PackageGroups.assignPackageGroups(
    {
        shopKey: shopKey,
        countryCode: countryCode,
        packageGroupId: packageGroupId
    },
    {
        requestBody: packageGroupWarehouses
    }
);

Parameters

ParameterTypeDetails
warehouseIdintegerread-only. The ID of the warehouse created by SCAYLE.
warehouseReferenceKeystringA key that uniquely identifies the warehouse within the tenant's ecosystem.

Example

let warehouses = [
    {
        warehouseReferenceKey: 'my-warehouse'
    },
    {
        warehouseId: 2
    }
];

await adminApi.apis.PackageGroups.assignPackageGroups(
    {
        shopKey: "ms",
        countryCode: "DE",
        packageGroupId: 3,
    },
    {
        requestBody: warehouses
    }
);

Replace a package group

Learn how to replace a package group for a list of shop warehouses.

When working with shop warehouses you can bulk replace a package group for provided warehouses for a specific shop country.

This method is used to replace a package group for a list of shop warehouses by providing a collection of shop warehouse identifiers.

This method does NOT support partial updates and therefore will assign the package group to the provided warehouses and remove it from others.

adminApi.apis.PackageGroups.replacePackageGroups(
    {
        shopKey: shopKey,
        countryCode: countryCode,
        packageGroupId: packageGroupId
    }, 
    {
        requestBody: packageGroupWarehouses
    }
);
ParameterDetails
warehouseId

Integer READ-ONLY

The ID of the warehouse created by SCAYLE.

warehouseReferenceKey

String

A key that uniquely identifies the warehouse within the tenant's ecosystem.

Example

let warehouses = [
    {
        warehouseReferenceKey: 'my-warehouse'
    },
    {
        warehouseId: 2
    }
];

await adminApi.apis.PackageGroups.replacePackageGroups(
    {
        shopKey: "ms",
        countryCode: "DE",
        packageGroupId: 3,
    },
    {
        requestBody: warehouses
    }
);

Get a collection of package groups

Learn how to get a collection of package groups for a shop country

When working with shop warehouses you can receive a collection of all package groups assigned to shop warehouses for a specific shop country.

This method is used to get a package group collection for a given shop country.

let response = await adminApi.apis.PackageGroups.getPackageGroups({ shopKey: shopKey, countryCode: countryCode });
let packageGroups = response.body.entities;
ParameterDetails
entitiesA collection of package groups.

Examples

let response = await adminApi.apis.PackageGroups.getPackageGroups({ shopKey: 'ms', countryCode: 'DE' });

let packageGroups = response.body.entities;

Delete a package group

Learn how to delete a package group for all warehouses of a given shop.

When working with shop warehouses you can delete a package group for a specific shop country.

This method is used to delete a package group for all shop warehouses for a specific shop country.

adminApi.apis.PackageGroups.deletePackageGroup(
    {
        shopKey: shopKey,
        countryCode: countryCode,
        packageGroupId: packageGroupId
    }
);

Examples

adminApi.apis.PackageGroups.deletePackageGroup(
    {
        shopKey: "ms",
        countryCode: "DE",
        packageGroupId: 3,
    }
);