import { BaseClient, ClientConfig, Response } from "@commerce-apps/core";
import type { CommonParameters } from "@commerce-apps/core";
import type { OperationOptions } from "retry";
import type { RequestInit } from "node-fetch";
import type { CompositeParameters, CustomRequestBody, QueryParameters, RequireParametersUnlessAllAreOptional } from "../../types";
import type { CreateOrderRequest, OmsStatusEventRequest, Order, OrderConfirmationStatusUpdateRequest, OrderExportStatus, OrderExportStatusUpdateRequest, OrderExternalStatusUpdateRequest, OrderPaymentStatus, OrderPaymentStatusUpdateRequest, OrderShippingStatus, OrderShippingStatusUpdateRequest, OrderStatusUpdateRequest, OrdersResponse, ShippingAddressUpdateRequest } from '../models/index';
export type GetOrdersSortByEnum = 'creation_date' | 'last_modified_date';
export type GetOrdersSortOrderEnum = 'asc' | 'desc';
export type GetOrdersConfirmationStatusEnum = 'confirmed' | 'not_confirmed';
/**
* [Orders](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=orders:Summary)
* ==================================
*
* *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/orders/orders-oas-v1-public.yaml)
# API Overview
Use the Orders API to update order status and order payment status, edit shipping addresses and custom order properties, manage order payment instruments, and get order information.
## Authentication & Authorization
The client requesting the order information must have access to the Orders resource. The API requests pass a system-to-system bearer token in the header of the request. The `POST /orders` endpoint uses the [ShopperTokenTsob](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=security%3AShopperTokenTsob) security scheme.
You must include `sfcc.orders` or `sfcc.orders.rw` in the client ID used to generate the OAuth token. For a full list of permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)
For detailed setup instructions, see the [Authorization for Admin APIs guide](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html).
### Response Details
### Timeouts
Admin API requests must respond within 60 seconds. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)
### Error Handling
Error responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)
## Use Cases
### Update Order Statuses
An order uses several status properties to define its workflow state. Some of them are used to trigger internal processes, such as inventory allocation. Others have no default function, but are available for use with customizations.
#### Order Status
The Order status reflects the overall status of the order. Transitions between order statuses trigger actions such as invoice generation and release of inventory reservations.
Order status can have one of the following values:
- `created` - Default value; denotes that the order was created in the system but is not yet placed.
- `new` - Set this value to place the order. When you set this value, the system generates shipment and invoice numbers. After the order is placed, you can’t change the order status to `created` or `failed`.
- `failed` - Set this value to fail the order, for example, when you reject the order or when its payment fails. When you set this value, the system releases the order’s inventory reservations and removes any coupon redemptions. You can only set this value if the current order status is `created`. If you change the order status from `failed` to `created`, the system tries to revert the actions taken when it was set to `failed`. If inventory isn’t available, the reversion can fail.
- `failed_with_reopen` - Set this value to fail the order and reopen the basket, if applicable. The order status is set to `failed`.
- `completed` - Set this value to mark the order as complete, based on your business process, for example: when the order is fully paid, exported, and shipped.
- `cancelled` - Set this value to cancel the order, for example: when the shopper requests it. When you set this value, the system releases the order’s inventory reservations, restores any wishlist items, and removes any coupon redemptions. If you change the order status from `cancelled` to `completed` or `new`, the system tries to revert the actions taken when it was set to `cancelled`. If inventory isn’t available, the reversion can fail.
#### Confirmation Status
An order confirmation is a document the vendor sends to the shopper. It confirms that the order has been received and accepted. You can use confirmation status to reflect the state of the document, or for other customizations. This field is provided for use in customizations. It isn’t associated with any default functionality.
Confirmation status can have one of the following values:
- `not_confirmed` - Default value.
- `confirmed` - Set this value when the order confirmation is sent to the shopper.
#### Export Status
After an order is placed, it must be fulfilled. If your process includes an external fulfillment system, such as a Warehouse Management System, you can use export status to manage the export of order data to the external system. For example, after using the GET /orders endpoint to get order data to export, set the order’s export status to `exported`. When identifying orders to export, your query can include orders with export status `ready` and exclude orders with export status `exported`.
Export status can have one of the following values:
- `not_exported` - Default value.
- `ready` - (custom purpose) Set this value when the order is ready for export.
- `exported` - Set this value when the order has been exported. When you set this value, the system finalizes the order’s inventory transactions.
- `failed` - (custom purpose) Set this value when the order export fails.
#### External Status
The external status field can hold any string value. For example, you can use it for values related to an external fulfillment system. This field is provided for use in customizations, and isn’t associated with any default functionality.
#### Payment Status
Use payment status to denote whether an order is partially or fully paid. This field is provided for use in customizations, and isn’t associated with any default functionality.
Payment status can have one of the following values:
- `not_paid` - Default value.
- `part_paid` - Set this value when the order is partially paid.
- `paid` - Set this value when the order is fully paid.
#### Shipping Status
Use shipping status to denote whether an order is partially or fully shipped. This field is provided for use in customizations, and isn’t associated with any default functionality.
Shipping status can have one of the following values:
- `not_shipped` - Default value.
- `part_shipped` - Set this value when the order is partially shipped.
- `shipped` - Set this value when the order is fully shipped.
Example scenarios:
- After a successful fraud check and payment authorization, set the order status to `new`.
- After a failed fraud check or payment authorization, set the order status to `failed`.
- After an order’s information is exported to the warehouse system, set the export status to `exported`.
- After the warehouse ships an order, set the shipping status to `shipped`.
### Change Shipping Address
Use the Orders API to update the shipping address on an order.
For example, a shopper places an order, and then sends a request to change the shipping address on that order.
### Get Order Data
Use the Orders API system-to-system integration use cases for order retrieval, reporting, dashboards, and so on. You can get information about a single order by specifying the order number, or get information about multiple orders by searching with attribute filters.
You can use the following attribute filters:
- order status
- export status
- external status
- confirmation status
- payment status
- shipping status
- creation date to/from
- last modified date to/from
- offset
- limit
You can sort the results in ascending or descending order using the following attributes (default: descending):
- creation date
- last modified date
### Create Orders
Use the createOrders endpoint to create orders from a third-party system, such as a social media platform. Before using the endpoint, you must first complete the checkout process: apply all sanity checks, reserve inventory, authorize payment, apply promotions, and calculate the full cost of the order. Orders made by third-party systems are treated the same as orders made directly through the B2C Commerce platform, including how status updates and exports are handled.
### Update Orders
Use the updateOrder endpoint to make changes to custom order attributes.
## Related APIs
- [Shopper Orders](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-orders?meta=Summary) — Create orders from baskets during the checkout flow.*
*
* For instructions on how to retrieve access token for admin APIs: https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html
* Example with admin auth
*
* ```typescript
* import { Orders, ClientConfig } from "commerce-sdk";
* // or
* const { Orders, ClientConfig } = require("commerce-sdk");
*
* const clientConfig: ClientConfig = {
* parameters: {
* clientId: "XXXXXX",
* organizationId: "XXXX",
* shortCode: "XXX",
* siteId: "XX"
* }
* };
*
* token = { access_token: 'INSERT_ACCESS_TOKEN_HERE' };
*
* clientConfig.headers['authorization'] = `Bearer ${token.access_token}`;
* const ordersClient = new Orders(clientConfig);
* ```
*
*
* API Version: 1.4.4
* Last Updated:
*
*
*/
export declare class Orders extends BaseClient {
constructor(config: ClientConfig);
/**
* Accepts a single fulfillment or adjustment event from an external OMS and forwards it to the
configured order event subscribers. Exactly one of fulfillmentEvent or adjustment must be
present. The event is processed asynchronously; the endpoint returns 202 Accepted once the
event is validated and queued.
*
* If you would like to get a raw Response object use the other createOmsStatusEvent function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
createOmsStatusEvent(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OmsStatusEventRequest & CustomRequestBody;
}>): Promise;
/**
* Accepts a single fulfillment or adjustment event from an external OMS and forwards it to the
configured order event subscribers. Exactly one of fulfillmentEvent or adjustment must be
present. The event is processed asynchronously; the endpoint returns 202 Accepted once the
event is validated and queued.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
createOmsStatusEvent(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OmsStatusEventRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
* Use this endpoint whenever a fully calculated and paid or authorized order is created in any third-party system.
The endpoint can create an order on-the-fly in the Commerce Cloud platform by passing the order as JSON payload in the body of the POST request.
Other than the Basket API, this endpoint decouples any relation to other system domains, such as:
- Products
- Inventory
- Promotions
- Gift certificates
- Coupons
The order isn't treated differently than any other orders in the Commerce Cloud platform, including status updates and order exports.
**Note**: For the custom attribute to be available for orders, configure it in Business Manager for both Basket and Order objects.
**Important**: This endpoint uses the `ShopperTokenTsob` security scheme. Always check the Security section of the endpoint documentation, which, by default, is hidden.
## Preconditions
The checkout must happen before making a request to this endpoint. That means that all sanity checks _are_ applied, the inventory _is_ reserved, the payment _is_ authorized, and the Basket _is_ fully calculated (including all promotions).
After meeting these conditions, it's possible to create the order in the Commerce Cloud platform.
## Decoupling
This endpoint can create an order with unknown products, different pricing for known products, unplanned price-adjustments (unrelated to the system's configured promotions), and passing unknown payment and shipping methods.
**Note**: There's no lookup or calculation, even if the passed object is configured in the platform.
## Still Coupled
The endpoint is still coupled to:
- the taxation policy (gross or net) specified in the site's preferences.
- the passed currency, which must be defined in the site.
## Calculation
The platform does not perform multiplying or dividing operations on this order.
The following fields are summed during runtime on the platform:
**Order Level**
- `adjustedMerchandizeTotalTax`
- `adjustedShippingTotalTax`
- `merchandizeTotalTax`
- `adjustedTax`
- `productSubTotal`
- `productTotal`
- `shippingTotalTax`
- `orderTotal`
- `taxTotal`
**Line Item Level**
- `priceAfterItemDiscount`
- `priceAfterOrderDiscount`
- `adjustedTax`
**Shipment**
- `merchandizeTotalTax`
- `productSubTotal`
- `productTotal`
- `shippingTotalTax`
To make sure the fields are summed correctly, the passed `orderTotal` and `taxTotal` are compared to the platform's summed `orderTotal` and `taxTotal`.
An `InvalidOrderTotalException` or `InvalidTaxTotalException` is thrown if the calculation doesn't match.
The `orderTotal` and `taxTotal` are calculated as follows:
- `orderTotal` = sum(`ProductLineItems.grossPrice`) + sum(`Shipments.shipmentTotal`) - sum(`ProductLineItems.PriceAdjustments.grossPrice` + `Order.PriceAdjustments.grossPrice`)
- `taxTotal` = sum (`ProductLineItems.tax`) + sum(`Shipments.taxTotal`) - sum(`ProductLineItems.PriceAdjustments.tax` + `Order.PriceAdjustments.tax`)
## Order Status
The order is automatically placed after creation.
The payment status can be set via payload.
All other status can be set via PATCH `orders/{orderNo}/status`.
*
* If you would like to get a raw Response object use the other createOrders function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
createOrders(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: CreateOrderRequest & CustomRequestBody;
}>): Promise;
/**
* Use this endpoint whenever a fully calculated and paid or authorized order is created in any third-party system.
The endpoint can create an order on-the-fly in the Commerce Cloud platform by passing the order as JSON payload in the body of the POST request.
Other than the Basket API, this endpoint decouples any relation to other system domains, such as:
- Products
- Inventory
- Promotions
- Gift certificates
- Coupons
The order isn't treated differently than any other orders in the Commerce Cloud platform, including status updates and order exports.
**Note**: For the custom attribute to be available for orders, configure it in Business Manager for both Basket and Order objects.
**Important**: This endpoint uses the `ShopperTokenTsob` security scheme. Always check the Security section of the endpoint documentation, which, by default, is hidden.
## Preconditions
The checkout must happen before making a request to this endpoint. That means that all sanity checks _are_ applied, the inventory _is_ reserved, the payment _is_ authorized, and the Basket _is_ fully calculated (including all promotions).
After meeting these conditions, it's possible to create the order in the Commerce Cloud platform.
## Decoupling
This endpoint can create an order with unknown products, different pricing for known products, unplanned price-adjustments (unrelated to the system's configured promotions), and passing unknown payment and shipping methods.
**Note**: There's no lookup or calculation, even if the passed object is configured in the platform.
## Still Coupled
The endpoint is still coupled to:
- the taxation policy (gross or net) specified in the site's preferences.
- the passed currency, which must be defined in the site.
## Calculation
The platform does not perform multiplying or dividing operations on this order.
The following fields are summed during runtime on the platform:
**Order Level**
- `adjustedMerchandizeTotalTax`
- `adjustedShippingTotalTax`
- `merchandizeTotalTax`
- `adjustedTax`
- `productSubTotal`
- `productTotal`
- `shippingTotalTax`
- `orderTotal`
- `taxTotal`
**Line Item Level**
- `priceAfterItemDiscount`
- `priceAfterOrderDiscount`
- `adjustedTax`
**Shipment**
- `merchandizeTotalTax`
- `productSubTotal`
- `productTotal`
- `shippingTotalTax`
To make sure the fields are summed correctly, the passed `orderTotal` and `taxTotal` are compared to the platform's summed `orderTotal` and `taxTotal`.
An `InvalidOrderTotalException` or `InvalidTaxTotalException` is thrown if the calculation doesn't match.
The `orderTotal` and `taxTotal` are calculated as follows:
- `orderTotal` = sum(`ProductLineItems.grossPrice`) + sum(`Shipments.shipmentTotal`) - sum(`ProductLineItems.PriceAdjustments.grossPrice` + `Order.PriceAdjustments.grossPrice`)
- `taxTotal` = sum (`ProductLineItems.tax`) + sum(`Shipments.taxTotal`) - sum(`ProductLineItems.PriceAdjustments.tax` + `Order.PriceAdjustments.tax`)
## Order Status
The order is automatically placed after creation.
The payment status can be set via payload.
All other status can be set via PATCH `orders/{orderNo}/status`.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
createOrders(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: CreateOrderRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other getOrder function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.orderNo - The order number.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type Order.
*/
getOrder(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
orderNo: string;
organizationId: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.orderNo - The order number.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type Order otherwise.
*/
getOrder(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
orderNo: string;
organizationId: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other getOrders function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.parameters.sortBy - Sort results by creation date or last modified date. The default is creation date.
* @param options.parameters.sortOrder - Sort results in ascending or descending order. The default is descending.
* @param options.parameters.status - Filter results by status. Valid statuses are 'new', 'completed', and 'cancelled'. You can include up to two statuses as a comma-separated string.
* @param options.parameters.exportStatus - Filter results by export status. Valid export statuses are 'not_exported', 'exported', 'ready', and 'failed'. You can include up to three export statuses as a comma-separated string.
* @param options.parameters.externalStatus - Filter results by external status.
* @param options.parameters.confirmationStatus - Filter results by confirmation status. Valid confirmation statuses are 'confirmed' and 'not_confirmed'.
* @param options.parameters.paymentStatus - Filter results by payment status. Valid payment statuses are 'not_paid', 'part_paid', and 'paid'. You can include up to two payment statuses as a comma-separated string.
* @param options.parameters.shippingStatus - Filter results by shipping status. Valid shipping statuses are 'not_shipped', 'part_shipped', and 'shipped'. You can include up to two shipping statuses as a comma-separated string.
* @param options.parameters.creationDateFrom - If passed, will return records where the `creationDate` is equal to or greater than the passed `date-only`.
* @param options.parameters.creationDateTo - If passed, will return records where the `creationDate` is less than the passed `date-only`.
* @param options.parameters.lastModifiedDateFrom - If passed, will return records where the `lastModifiedDate` is equal to or greater than the passed `date-only`.
* @param options.parameters.lastModifiedDateTo - If passed, will return records where the `lastModifiedDate` is less than the passed `date-only`.
* @param options.parameters.limit - Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 100.
* @param options.parameters.offset - Used to retrieve the results based on a particular resource offset.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type OrdersResponse.
*/
getOrders(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
sortBy?: GetOrdersSortByEnum;
sortOrder?: GetOrdersSortOrderEnum;
status?: string;
exportStatus?: Array;
externalStatus?: string;
confirmationStatus?: GetOrdersConfirmationStatusEnum;
paymentStatus?: Array;
shippingStatus?: Array;
creationDateFrom?: string;
creationDateTo?: string;
lastModifiedDateFrom?: string;
lastModifiedDateTo?: string;
limit?: number;
offset?: number;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.parameters.sortBy - Sort results by creation date or last modified date. The default is creation date.
* @param options.parameters.sortOrder - Sort results in ascending or descending order. The default is descending.
* @param options.parameters.status - Filter results by status. Valid statuses are 'new', 'completed', and 'cancelled'. You can include up to two statuses as a comma-separated string.
* @param options.parameters.exportStatus - Filter results by export status. Valid export statuses are 'not_exported', 'exported', 'ready', and 'failed'. You can include up to three export statuses as a comma-separated string.
* @param options.parameters.externalStatus - Filter results by external status.
* @param options.parameters.confirmationStatus - Filter results by confirmation status. Valid confirmation statuses are 'confirmed' and 'not_confirmed'.
* @param options.parameters.paymentStatus - Filter results by payment status. Valid payment statuses are 'not_paid', 'part_paid', and 'paid'. You can include up to two payment statuses as a comma-separated string.
* @param options.parameters.shippingStatus - Filter results by shipping status. Valid shipping statuses are 'not_shipped', 'part_shipped', and 'shipped'. You can include up to two shipping statuses as a comma-separated string.
* @param options.parameters.creationDateFrom - If passed, will return records where the `creationDate` is equal to or greater than the passed `date-only`.
* @param options.parameters.creationDateTo - If passed, will return records where the `creationDate` is less than the passed `date-only`.
* @param options.parameters.lastModifiedDateFrom - If passed, will return records where the `lastModifiedDate` is equal to or greater than the passed `date-only`.
* @param options.parameters.lastModifiedDateTo - If passed, will return records where the `lastModifiedDate` is less than the passed `date-only`.
* @param options.parameters.limit - Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 100.
* @param options.parameters.offset - Used to retrieve the results based on a particular resource offset.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type OrdersResponse otherwise.
*/
getOrders(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
sortBy?: GetOrdersSortByEnum;
sortOrder?: GetOrdersSortOrderEnum;
status?: string;
exportStatus?: Array;
externalStatus?: string;
confirmationStatus?: GetOrdersConfirmationStatusEnum;
paymentStatus?: Array;
shippingStatus?: Array;
creationDateFrom?: string;
creationDateTo?: string;
lastModifiedDateFrom?: string;
lastModifiedDateTo?: string;
limit?: number;
offset?: number;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrder function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.orderNo - The order number.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrder(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
orderNo: string;
organizationId: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: {
[key: string]: any;
} & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.orderNo - The order number.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrder(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
orderNo: string;
organizationId: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: {
[key: string]: any;
} & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrderConfirmationStatus function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderConfirmationStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderConfirmationStatusUpdateRequest & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderConfirmationStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderConfirmationStatusUpdateRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrderExportStatus function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderExportStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderExportStatusUpdateRequest & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderExportStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderExportStatusUpdateRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrderExternalStatus function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderExternalStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderExternalStatusUpdateRequest & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderExternalStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderExternalStatusUpdateRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrderPaymentInstrument function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.paymentInstrumentId - ID of the payment instrument.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderPaymentInstrument(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
paymentInstrumentId: string;
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: {
[key: string]: any;
} & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.paymentInstrumentId - ID of the payment instrument.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderPaymentInstrument(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
paymentInstrumentId: string;
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: {
[key: string]: any;
} & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrderPaymentStatus function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderPaymentStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderPaymentStatusUpdateRequest & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderPaymentStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderPaymentStatusUpdateRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrderPaymentTransaction function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.paymentInstrumentId - ID of the payment instrument.
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderPaymentTransaction(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
paymentInstrumentId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: {
[key: string]: any;
} & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.paymentInstrumentId - ID of the payment instrument.
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderPaymentTransaction(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
paymentInstrumentId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: {
[key: string]: any;
} & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrderShippingAddress function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.shipmentId - ID of the shipment.
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderShippingAddress(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
shipmentId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: ShippingAddressUpdateRequest & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.shipmentId - ID of the shipment.
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderShippingAddress(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
shipmentId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: ShippingAddressUpdateRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
*
*
* If you would like to get a raw Response object use the other updateOrderShippingStatus function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderShippingStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderShippingStatusUpdateRequest & CustomRequestBody;
}>): Promise;
/**
*
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderShippingStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderShippingStatusUpdateRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
* Orders in status NEW, COMPLETED or CANCELLED can't be changed to status CREATED or FAILED.
Changing the status causes different actions on inventory, coupons, wishlists, and the order itself:
- Fail Order: Release inventory and remove coupon redemptions. (CREATED -> FAILED)
- Fail Order With Reopen Basket: Release inventory, remove coupon redemptions, and reopen the basket, if applicable. A basket can only be
reopened if no other basket for the customer exists at the moment of failing the order since a customer is limited to 1 storefront basket. (CREATED -> FAILED)
- Undo Fail Order: Reserve inventory and recreate coupon redemptions. (FAILED -> CREATED)
- Place Order: Generate Shipment and invoice numbers. (CREATED -> NEW, COMPLETED or CANCELLED)
- Cancel Order: Release inventory, remove wishlist purchases, and remove coupon redemptions. (NEW, COMPLETED -> CANCELLED)
- Undo Cancel Order: Reserve inventory, add wishlist purchases, and recreate coupon redemptions. (CANCELLED -> NEW, COMPLETED)
Actions can fail, for example: when inventory is no longer available.
*
* If you would like to get a raw Response object use the other updateOrderStatus function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type void.
*/
updateOrderStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderStatusUpdateRequest & CustomRequestBody;
}>): Promise;
/**
* Orders in status NEW, COMPLETED or CANCELLED can't be changed to status CREATED or FAILED.
Changing the status causes different actions on inventory, coupons, wishlists, and the order itself:
- Fail Order: Release inventory and remove coupon redemptions. (CREATED -> FAILED)
- Fail Order With Reopen Basket: Release inventory, remove coupon redemptions, and reopen the basket, if applicable. A basket can only be
reopened if no other basket for the customer exists at the moment of failing the order since a customer is limited to 1 storefront basket. (CREATED -> FAILED)
- Undo Fail Order: Reserve inventory and recreate coupon redemptions. (FAILED -> CREATED)
- Place Order: Generate Shipment and invoice numbers. (CREATED -> NEW, COMPLETED or CANCELLED)
- Cancel Order: Release inventory, remove wishlist purchases, and remove coupon redemptions. (NEW, COMPLETED -> CANCELLED)
- Undo Cancel Order: Reserve inventory, add wishlist purchases, and recreate coupon redemptions. (CANCELLED -> NEW, COMPLETED)
Actions can fail, for example: when inventory is no longer available.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
* @param options.parameters.orderNo - The order number.
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
updateOrderStatus(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
orderNo: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: OrderStatusUpdateRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
}