ordercloud-javascript-sdk
    Preparing search index...

    Class Orders

    Index
    • Auto-apply promotions to an order Apply up to 100 eligible promotions where AutoApply=true. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • 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<TOrder>>

    • Returns this

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

      Orders.As().List() // lists Orders using the impersonated users' token
      
    • Cancel an order Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • 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<TOrder>>

    • Complete an order Use only when an order doesn't need a shipment. You will not be able to ship or reopen an order after completing it. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • 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<TOrder>>

    • Delete an order Check out the docs for more info

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • 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>

    • Retrieve an order Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • 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<TOrder>>

    • List orders Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • listOptions: {
            buyerID?: string;
            filters?: Filters;
            from?: string;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "FromCompanyID" | "ToCompanyID" | "Comments")[];
            searchType?: SearchType;
            sortBy?: (
                | "ID"
                | "FromCompanyID"
                | "ToCompanyID"
                | "DateCreated"
                | "!ID"
                | "!DateCreated"
                | "DateSubmitted"
                | "FromUserID"
                | "Status"
                | "DateApproved"
                | "DateDeclined"
                | "DateCanceled"
                | "DateCompleted"
                | "LastUpdated"
                | "Subtotal"
                | "ShippingCost"
                | "TaxCost"
                | "Gratuity"
                | "Fees"
                | "BaseDiscount"
                | "PromotionDiscount"
                | "Total"
                | "IsSubmitted"
                | "!DateSubmitted"
                | "!FromCompanyID"
                | "!ToCompanyID"
                | "!FromUserID"
                | "!Status"
                | "!DateApproved"
                | "!DateDeclined"
                | "!DateCanceled"
                | "!DateCompleted"
                | "!LastUpdated"
                | "!Subtotal"
                | "!ShippingCost"
                | "!TaxCost"
                | "!Gratuity"
                | "!Fees"
                | "!BaseDiscount"
                | "!PromotionDiscount"
                | "!Total"
                | "!IsSubmitted"
            )[];
            supplierID?: string;
            to?: string;
        } = {}
        • OptionalbuyerID?: string

          ID of the buyer.

        • 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.???'

        • Optionalfrom?: string

          Lower bound of date range that the order was created.

        • 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" | "FromCompanyID" | "ToCompanyID" | "Comments")[]

          Comma-delimited list of fields to search on.

        • OptionalsearchType?: SearchType

          Type of search to perform.

        • OptionalsortBy?: (
              | "ID"
              | "FromCompanyID"
              | "ToCompanyID"
              | "DateCreated"
              | "!ID"
              | "!DateCreated"
              | "DateSubmitted"
              | "FromUserID"
              | "Status"
              | "DateApproved"
              | "DateDeclined"
              | "DateCanceled"
              | "DateCompleted"
              | "LastUpdated"
              | "Subtotal"
              | "ShippingCost"
              | "TaxCost"
              | "Gratuity"
              | "Fees"
              | "BaseDiscount"
              | "PromotionDiscount"
              | "Total"
              | "IsSubmitted"
              | "!DateSubmitted"
              | "!FromCompanyID"
              | "!ToCompanyID"
              | "!FromUserID"
              | "!Status"
              | "!DateApproved"
              | "!DateDeclined"
              | "!DateCanceled"
              | "!DateCompleted"
              | "!LastUpdated"
              | "!Subtotal"
              | "!ShippingCost"
              | "!TaxCost"
              | "!Gratuity"
              | "!Fees"
              | "!BaseDiscount"
              | "!PromotionDiscount"
              | "!Total"
              | "!IsSubmitted"
          )[]

          Comma-delimited list of fields to sort by.

        • OptionalsupplierID?: string

          ID of the supplier.

        • Optionalto?: string

          Upper bound of date range that the order was created.

      • 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<TOrder>>>

    • List order approvals Returns all Approvals associated with the Order. Check out the docs for more info

      Type Parameters

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: (
                "Comments"
                | "ApprovalRuleID"
                | "ApprovingGroupID"
                | "Approver"
            )[];
            sortBy?: (
                | "ApprovalRuleID"
                | "ApprovingGroupID"
                | "Approver"
                | "DateCreated"
                | "!DateCreated"
                | "!ApprovingGroupID"
                | "Status"
                | "DateCompleted"
                | "!Status"
                | "!DateCompleted"
                | "!ApprovalRuleID"
                | "!Approver"
                | "AllowResubmit"
                | "!AllowResubmit"
            )[];
        } = {}
        • 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?: ("Comments" | "ApprovalRuleID" | "ApprovingGroupID" | "Approver")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ApprovalRuleID"
              | "ApprovingGroupID"
              | "Approver"
              | "DateCreated"
              | "!DateCreated"
              | "!ApprovingGroupID"
              | "Status"
              | "DateCompleted"
              | "!Status"
              | "!DateCompleted"
              | "!ApprovalRuleID"
              | "!Approver"
              | "AllowResubmit"
              | "!AllowResubmit"
          )[]

          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<TOrderApproval>>>

    • List order eligible approvers Returns all Users who can approve or decline this order (but have not done so). Check out the docs for more info

      Type Parameters

      • TUser extends User<any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "LastName" | "FirstName" | "Username" | "Email")[];
            sortBy?: (
                | "ID"
                | "LastName"
                | "FirstName"
                | "Username"
                | "Email"
                | "DateCreated"
                | "!ID"
                | "!DateCreated"
                | "!FirstName"
                | "!LastName"
                | "LastActive"
                | "PasswordLastSetDate"
                | "!Username"
                | "!Email"
                | "!LastActive"
                | "!PasswordLastSetDate"
            )[];
        } = {}
        • 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" | "LastName" | "FirstName" | "Username" | "Email")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "LastName"
              | "FirstName"
              | "Username"
              | "Email"
              | "DateCreated"
              | "!ID"
              | "!DateCreated"
              | "!FirstName"
              | "!LastName"
              | "LastActive"
              | "PasswordLastSetDate"
              | "!Username"
              | "!Email"
              | "!LastActive"
              | "!PasswordLastSetDate"
          )[]

          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<TUser>>>

    • List eligible promotions for an order Check out the docs for more info

      Type Parameters

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: (
                | "ID"
                | "Name"
                | "Description"
                | "Code"
                | "FinePrint"
                | "EligibleExpression"
                | "ValueExpression"
            )[];
            sortBy?: (
                | "ID"
                | "Name"
                | "ExpirationDate"
                | "Code"
                | "EligibleExpression"
                | "ValueExpression"
                | "!ID"
                | "!Name"
                | "!ExpirationDate"
                | "StartDate"
                | "CanCombine"
                | "AutoApply"
                | "Active"
                | "Priority"
                | "!Code"
                | "!StartDate"
                | "!EligibleExpression"
                | "!ValueExpression"
                | "!CanCombine"
                | "!AutoApply"
                | "!Active"
                | "!Priority"
            )[];
        } = {}
        • 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"
              | "Name"
              | "Description"
              | "Code"
              | "FinePrint"
              | "EligibleExpression"
              | "ValueExpression"
          )[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "Name"
              | "ExpirationDate"
              | "Code"
              | "EligibleExpression"
              | "ValueExpression"
              | "!ID"
              | "!Name"
              | "!ExpirationDate"
              | "StartDate"
              | "CanCombine"
              | "AutoApply"
              | "Active"
              | "Priority"
              | "!Code"
              | "!StartDate"
              | "!EligibleExpression"
              | "!ValueExpression"
              | "!CanCombine"
              | "!AutoApply"
              | "!Active"
              | "!Priority"
          )[]

          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<TEligiblePromotion>>>

    • List order promotions Check out the docs for more info

      Type Parameters

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: (
                | "ID"
                | "Name"
                | "Description"
                | "Code"
                | "FinePrint"
                | "EligibleExpression"
                | "ValueExpression"
            )[];
            sortBy?: (
                | "ID"
                | "Name"
                | "ExpirationDate"
                | "Code"
                | "EligibleExpression"
                | "ValueExpression"
                | "!ID"
                | "!Name"
                | "!ExpirationDate"
                | "StartDate"
                | "CanCombine"
                | "AutoApply"
                | "Active"
                | "Priority"
                | "!Code"
                | "!StartDate"
                | "!EligibleExpression"
                | "!ValueExpression"
                | "!CanCombine"
                | "!AutoApply"
                | "!Active"
                | "!Priority"
                | "DateApplied"
                | "!DateApplied"
            )[];
        } = {}
        • 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"
              | "Name"
              | "Description"
              | "Code"
              | "FinePrint"
              | "EligibleExpression"
              | "ValueExpression"
          )[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "Name"
              | "ExpirationDate"
              | "Code"
              | "EligibleExpression"
              | "ValueExpression"
              | "!ID"
              | "!Name"
              | "!ExpirationDate"
              | "StartDate"
              | "CanCombine"
              | "AutoApply"
              | "Active"
              | "Priority"
              | "!Code"
              | "!StartDate"
              | "!EligibleExpression"
              | "!ValueExpression"
              | "!CanCombine"
              | "!AutoApply"
              | "!Active"
              | "!Priority"
              | "DateApplied"
              | "!DateApplied"
          )[]

          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<TOrderPromotion>>>

    • List shipments for an order Check out the docs for more info

      Type Parameters

      • TShipment extends Shipment<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: (
                | "ID"
                | "BuyerID"
                | "Shipper"
                | "DateShipped"
                | "DateDelivered"
                | "TrackingNumber"
            )[];
            sortBy?: (
                | "ID"
                | "BuyerID"
                | "Shipper"
                | "DateShipped"
                | "DateDelivered"
                | "!ID"
                | "OwnerID"
                | "!OwnerID"
                | "!BuyerID"
                | "Cost"
                | "!DateShipped"
                | "!Shipper"
                | "!DateDelivered"
                | "!Cost"
            )[];
        } = {}
        • 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"
              | "BuyerID"
              | "Shipper"
              | "DateShipped"
              | "DateDelivered"
              | "TrackingNumber"
          )[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "BuyerID"
              | "Shipper"
              | "DateShipped"
              | "DateDelivered"
              | "!ID"
              | "OwnerID"
              | "!OwnerID"
              | "!BuyerID"
              | "Cost"
              | "!DateShipped"
              | "!Shipper"
              | "!DateDelivered"
              | "!Cost"
          )[]

          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<TShipment>>>

    • Partially update an order billing address Not allowed on unsubmitted orders where BillingAddressID has been set. In that case, use the Addresses resource to update the saved address. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • address: PartialDeep<Address>
      • 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<TOrder>>

    • Partially update an order from user Only FirstName, LastName, and Email can be updated.

      Primarily used to facilitate guest checkout scenarios. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • user: PartialDeep<User>
      • 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<TOrder>>

    • Partially update an order shipping address Not allowed on unsubmitted orders where ShippingAddressID has been set. In that case, use the Addresses resource to update the saved address. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • address: PartialDeep<Address>
      • 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<TOrder>>

    • Remove a promotion from an order Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • promoCode: string

        Promo code of the order.

      • 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<TOrder>>

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

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • order: Order
      • 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<TOrder>>

    • Set a billing address Use only when the address is not to be saved/reused.

      To use a saved address (i.e. from the Addresses resource), PATCH the order's BillingAddressID property instead. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • address: Address

        Required fields: Street1, City, Country

      • 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<TOrder>>

    • Set a shipping address Use only when the address is not to be saved/reused. To use a saved address (i.e. from the Addresses resource), PATCH the order's ShippingAddressID property instead. The address used will be populated on the ShippingAddress property of each LineItem. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • address: Address

        Required fields: Street1, City, Country

      • 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<TOrder>>

    • Create a new shipment containing all items on an order Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • shipment: Shipment
      • 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<TOrder>>

    • Submit an order Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • 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<TOrder>>

    • Validate an order in its current state Check out the docs for more info

      Parameters

      • direction: OrderDirection

        Direction of the order, from the current user's perspective.

      • orderID: string

        ID of the order.

      • 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>