Skip to content
Docs
Reference

BackstageClient.deliveryMethods

BackstageClient.deliveryMethods in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / deliveryMethods

deliveryMethods: {
  getPolicy: (scopeType: string, scopeId: string, requestOptions?: RequestOptions) => Promise<{
     allowedMethods:   | (
        | "email"
        | "sms"
        | "app"
        | "exchange"
        | "print_now"
        | "wallet"
        | "box_office_print"
        | "post"
        | "collect"
        | "load_onto_card"
        | "print_mail_partner")[]
        | null;
     cutoffHours:   | {
      [key: string]: number;
      }
        | null;
     postCountries: string[] | null;
     providers:   | {
      [key: string]: string;
      }
        | null;
     scopeId: string;
     scopeType: "account" | "organisation" | "channel" | "event";
     updatedAt: string | null;
  }>;
  list: (requestOptions?: RequestOptions) => Promise<{
     carries: (
        | "pdf"
        | "wallet_pass"
        | "app_pass"
        | "thermal_print"
        | "encoded_media"
        | "card_load"
       | "link")[];
     comingIn: string | null;
     defaultCutoffHours: number | null;
     key:   | "email"
        | "sms"
        | "app"
        | "exchange"
        | "print_now"
        | "wallet"
        | "box_office_print"
        | "post"
        | "collect"
        | "load_onto_card"
        | "print_mail_partner";
     kind: "digital" | "physical";
     label: string;
     needsAddress: boolean;
     needsHolderName: boolean;
     shipped: boolean;
     surfaces: ("box_office" | "online")[];
     workflow:   | "exchange"
        | "automatic"
        | "immediate"
        | "at_sale"
        | "dispatch"
        | "collection";
  }[]>;
  setPolicy: (scopeType: string, scopeId: string, request: {
     allowedMethods?:   | (
        | "email"
        | "sms"
        | "app"
        | "exchange"
        | "print_now"
        | "wallet"
        | "box_office_print"
        | "post"
        | "collect"
        | "load_onto_card"
        | "print_mail_partner")[]
        | null;
     cutoffHours?:   | {
      [key: string]: number;
      }
        | null;
     postCountries?: string[] | null;
     providers?:   | {
      [key: string]: string;
      }
        | null;
   }, requestOptions?: RequestOptions) => Promise<{
     allowedMethods:   | (
        | "email"
        | "sms"
        | "app"
        | "exchange"
        | "print_now"
        | "wallet"
        | "box_office_print"
        | "post"
        | "collect"
        | "load_onto_card"
        | "print_mail_partner")[]
        | null;
     cutoffHours:   | {
      [key: string]: number;
      }
        | null;
     postCountries: string[] | null;
     providers:   | {
      [key: string]: string;
      }
        | null;
     scopeId: string;
     scopeType: "account" | "organisation" | "channel" | "event";
     updatedAt: string | null;
  }>;
};

Defined in: client.ts:6640

Delivery methods methods

getPolicy()#

getPolicy: (scopeType: string, scopeId: string, requestOptions?: RequestOptions) => Promise<{
  allowedMethods:   | (
     | "email"
     | "sms"
     | "app"
     | "exchange"
     | "print_now"
     | "wallet"
     | "box_office_print"
     | "post"
     | "collect"
     | "load_onto_card"
     | "print_mail_partner")[]
     | null;
  cutoffHours:   | {
   [key: string]: number;
   }
     | null;
  postCountries: string[] | null;
  providers:   | {
   [key: string]: string;
   }
     | null;
  scopeId: string;
  scopeType: "account" | "organisation" | "channel" | "event";
  updatedAt: string | null;
}>;

Get the delivery methods one level offers One level's delivery method policy: the organisation, an account, a sales channel or an event. A level never set inherits everything (updatedAt is null). Needs orders.read for the organisation (on every account) or an account, saleschannels.read for a channel, events.read for an event.

Parameters#

ParameterType
scopeTypestring
scopeIdstring
requestOptions?RequestOptions

Returns#

Promise<{ allowedMethods: | ( | "email" | "sms" | "app" | "exchange" | "print_now" | "wallet" | "box_office_print" | "post" | "collect" | "load_onto_card" | "print_mail_partner")[] | null; cutoffHours: | { [key: string]: number; } | null; postCountries: string[] | null; providers: | { [key: string]: string; } | null; scopeId: string; scopeType: "account" | "organisation" | "channel" | "event"; updatedAt: string | null; }>

Operation Id#

getDeliveryMethodPolicy

list()#

list: (requestOptions?: RequestOptions) => Promise<{
  carries: (
     | "pdf"
     | "wallet_pass"
     | "app_pass"
     | "thermal_print"
     | "encoded_media"
     | "card_load"
    | "link")[];
  comingIn: string | null;
  defaultCutoffHours: number | null;
  key:   | "email"
     | "sms"
     | "app"
     | "exchange"
     | "print_now"
     | "wallet"
     | "box_office_print"
     | "post"
     | "collect"
     | "load_onto_card"
     | "print_mail_partner";
  kind: "digital" | "physical";
  label: string;
  needsAddress: boolean;
  needsHolderName: boolean;
  shipped: boolean;
  surfaces: ("box_office" | "online")[];
  workflow:   | "exchange"
     | "automatic"
     | "immediate"
     | "at_sale"
     | "dispatch"
     | "collection";
}[]>;

List the delivery method catalogue Every way a pass or item can reach the person, with its kind (digital or physical), whether it needs an address, what it carries, how it is fulfilled and where it can be offered. The catalogue is fixed in code; which methods are offered is set per level with PUT /delivery-methods/policies/{scopeType}/{scopeId}, and a method is priced with a fee component of kind delivery conditioned on it.

Parameters#

ParameterType
requestOptions?RequestOptions

Returns#

Promise<{ carries: ( | "pdf" | "wallet_pass" | "app_pass" | "thermal_print" | "encoded_media" | "card_load" | "link")[]; comingIn: string | null; defaultCutoffHours: number | null; key: | "email" | "sms" | "app" | "exchange" | "print_now" | "wallet" | "box_office_print" | "post" | "collect" | "load_onto_card" | "print_mail_partner"; kind: "digital" | "physical"; label: string; needsAddress: boolean; needsHolderName: boolean; shipped: boolean; surfaces: ("box_office" | "online")[]; workflow: | "exchange" | "automatic" | "immediate" | "at_sale" | "dispatch" | "collection"; }[]>

Operation Id#

listDeliveryMethodCatalogue

setPolicy()#

setPolicy: (scopeType: string, scopeId: string, request: {
  allowedMethods?:   | (
     | "email"
     | "sms"
     | "app"
     | "exchange"
     | "print_now"
     | "wallet"
     | "box_office_print"
     | "post"
     | "collect"
     | "load_onto_card"
     | "print_mail_partner")[]
     | null;
  cutoffHours?:   | {
   [key: string]: number;
   }
     | null;
  postCountries?: string[] | null;
  providers?:   | {
   [key: string]: string;
   }
     | null;
}, requestOptions?: RequestOptions) => Promise<{
  allowedMethods:   | (
     | "email"
     | "sms"
     | "app"
     | "exchange"
     | "print_now"
     | "wallet"
     | "box_office_print"
     | "post"
     | "collect"
     | "load_onto_card"
     | "print_mail_partner")[]
     | null;
  cutoffHours:   | {
   [key: string]: number;
   }
     | null;
  postCountries: string[] | null;
  providers:   | {
   [key: string]: string;
   }
     | null;
  scopeId: string;
  scopeType: "account" | "organisation" | "channel" | "event";
  updatedAt: string | null;
}>;

Set the delivery methods one level offers Sets which delivery methods a level offers, how many hours before the event each closes, the countries post may go to, and (for the organisation or an account) the provider serving each method. Managed Fulfilment can be chosen only once Ticketlayer has turned it on for the organisation (409 MANAGED_FULFILMENT_NOT_ENABLED otherwise). Fields left out keep their value; null inherits the level above. Levels only narrow. Needs orders.update for the organisation (on every account) or an account, saleschannels.update for a channel, events.update for an event.

Parameters#

ParameterTypeDescription
scopeTypestring-
scopeIdstring-
request{ allowedMethods?: | ( | "email" | "sms" | "app" | "exchange" | "print_now" | "wallet" | "box_office_print" | "post" | "collect" | "load_onto_card" | "print_mail_partner")[] | null; cutoffHours?: | { [key: string]: number; } | null; postCountries?: string[] | null; providers?: | { [key: string]: string; } | null; }-
request.allowedMethods?| ( | "email" | "sms" | "app" | "exchange" | "print_now" | "wallet" | "box_office_print" | "post" | "collect" | "load_onto_card" | "print_mail_partner")[] | nullDescription The methods this level offers. Null inherits the level above; a list narrows it, and levels below can only narrow further. A channel that names none offers its type's defaults: email everywhere; print at home for anything a buyer uses; printing at the till for a box office; load onto a card wherever the pass policy allows it. Post and collection are opted into. Example [ "email", "post" ]
request.cutoffHours?| { [key: string]: number; } | nullDescription Hours before the first event each method closes, by method; a method left out inherits. Across the events on a sale the longest wins. Null clears them all. Example { * "post": 240 * }
request.postCountries?string[] | nullDescription ISO 3166 countries post may go to; null is anywhere. Every level that names a list must name the country. Example [ "GB", "IE" ]
request.providers?| { [key: string]: string; } | nullDescription Which fulfilment provider serves a method, where not the default (email: ticketlayer_email; everything else: in_house). Set by the organisation or an account, for example { "post": "managed_fulfilment" }. A provider that does not serve the method is refused (400 FULFILMENT_PROVIDER_UNSUITABLE). Null clears them. Example { * "post": "managed_fulfilment" * }
requestOptions?RequestOptions-

Returns#

Promise<{ allowedMethods: | ( | "email" | "sms" | "app" | "exchange" | "print_now" | "wallet" | "box_office_print" | "post" | "collect" | "load_onto_card" | "print_mail_partner")[] | null; cutoffHours: | { [key: string]: number; } | null; postCountries: string[] | null; providers: | { [key: string]: string; } | null; scopeId: string; scopeType: "account" | "organisation" | "channel" | "event"; updatedAt: string | null; }>

Operation Id#

putDeliveryMethodPolicy