• A helper function designed to make calls to a custom API endpoint For more information about custom APIs, please refer to the API documentation

    Parameters

    • args: {
          clientConfig: ClientConfigInit<CustomParams>;
          options: {
              body?: any;
              customApiPathParameters?: {
                  apiName?: string;
                  apiVersion?: string;
                  endpointPath?: string;
                  organizationId?: string;
                  shortCode?: string;
              };
              headers?: {
                  authorization?: string;
              } & {
                  [key: string]: string;
              };
              method?: string;
              parameters?: {
                  [key: string]: string | number | boolean | string[] | number[];
              };
          };
          rawResponse?: boolean;
      }

      Argument object containing data used for custom API request

      • clientConfig: ClientConfigInit<CustomParams>

        Client Configuration object used by the SDK with properties that can affect the fetch call

      • options: {
            body?: any;
            customApiPathParameters?: {
                apiName?: string;
                apiVersion?: string;
                endpointPath?: string;
                organizationId?: string;
                shortCode?: string;
            };
            headers?: {
                authorization?: string;
            } & {
                [key: string]: string;
            };
            method?: string;
            parameters?: {
                [key: string]: string | number | boolean | string[] | number[];
            };
        }

        An object containing any custom settings you want to apply to the request

        • Optional body?: any
        • Optional customApiPathParameters?: {
              apiName?: string;
              apiVersion?: string;
              endpointPath?: string;
              organizationId?: string;
              shortCode?: string;
          }
          • Optional apiName?: string
          • Optional apiVersion?: string
          • Optional endpointPath?: string
          • Optional organizationId?: string
          • Optional shortCode?: string
        • Optional headers?: {
              authorization?: string;
          } & {
              [key: string]: string;
          }
        • Optional method?: string
        • Optional parameters?: {
              [key: string]: string | number | boolean | string[] | number[];
          }
          • [key: string]: string | number | boolean | string[] | number[]
      • Optional rawResponse?: boolean

    Returns Promise<unknown>

    Raw response or data from response based on rawResponse argument from fetch call