ordercloud-javascript-sdk
    Preparing search index...

    Class ApiClients

    Index
    • Returns this

      enables impersonation by calling the subsequent method with the stored impersonation token

      ApiClients.As().List() // lists ApiClients using the impersonated users' token
      
    • Delete an API client Check out the docs for more info

      Parameters

      • apiClientID: string

        ID of the api client.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete an API client buyer assignment Check out the docs for more info

      Parameters

      • apiClientID: string

        ID of the api client.

      • buyerID: string

        ID of the buyer.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete an API client secret Check out the docs for more info

      Parameters

      • apiClientID: string

        ID of the api client.

      • apiClientSecretID: string

        ID of the api client secret.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete an API client supplier assignment Check out the docs for more info

      Parameters

      • apiClientID: string

        ID of the api client.

      • supplierID: string

        ID of the supplier.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • List API clients Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "AppName" | "DefaultContextUserName")[];
            sortBy?: (
                | "ID"
                | "AppName"
                | "DefaultContextUserName"
                | "!ID"
                | "!AppName"
                | "!DefaultContextUserName"
            )[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: ("ID" | "AppName" | "DefaultContextUserName")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "AppName"
              | "DefaultContextUserName"
              | "!ID"
              | "!AppName"
              | "!DefaultContextUserName"
          )[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TApiClient>>>

    • List API client assignments Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            apiClientID?: string;
            buyerID?: string;
            page?: number;
            pageSize?: number;
            supplierID?: string;
        } = {}
        • OptionalapiClientID?: string

          ID of the api client.

        • OptionalbuyerID?: string

          ID of the buyer.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • OptionalsupplierID?: string

          ID of the supplier.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TApiClientAssignment>>>

    • List API client secrets Check out the docs for more info

      Type Parameters

      Parameters

      • apiClientID: string

        ID of the api client.

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: "ID"[];
            sortBy?: ("ID" | "!ID")[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: "ID"[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: ("ID" | "!ID")[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TApiClientSecret>>>

    • Create or update an API client If an object with the same ID already exists, it will be overwritten. Check out the docs for more info

      Type Parameters

      Parameters

      • apiClientID: string

        ID of the api client.

      • apiClient: ApiClient

        Required fields: AccessTokenDuration, AppName

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TApiClient>>

    • Create or update an API client assignment Check out the docs for more info

      Parameters

      • apiClientAssignment: ApiClientAssignment

        Required fields: ApiClientID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>