Skip to main content

PackagesService

A list of all methods in the PackagesService service. Click on the method name to view detailed information about that method.

MethodsDescription
listPackagesList Packages

listPackages

List Packages

  • HTTP Method: GET
  • Endpoint: /packages

Parameters

NameTypeRequiredDescription
destinationstringISO representation of the package's destination.
startDatestringStart date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
endDatestringEnd date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
afterCursorstringTo get the next batch of results, use this parameter. It tells the API where to start fetching data after the last item you received. It helps you avoid repeats and efficiently browse through large sets of data.
limitnumberMaximum number of packages to be returned in the response. The value must be greater than 0 and less than or equal to 160. If not provided, the default value is 20
startTimenumberEpoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months
endTimenumberEpoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time
durationnumberDuration in seconds for the package's validity. If this parameter is present, it will override the startTime and endTime parameters. The maximum duration for a package's validity period is 90 days

Return Type

ListPackagesOkResponse

Example Usage Code Snippet

import { Celitech } from 'celitech-sdk';

(async () => {
const celitech = new Celitech({
clientId: 'client-id',
clientSecret: 'client-secret',
});

const { data } = await celitech.packages.listPackages({});

console.log(data);
})();

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →