Skip to content

Conversation

@sf-deepali-bharmal
Copy link

Background
The Shopper Orders API getOrder endpoint supports an expand query parameter (e.g., expand=oms) to provide Orders data from OMS (Order Management System) if Order is pushed to SOM, otherwise provides Orders data from ECOM. However, this parameter is currently missing from the SDK's paramKeys for getOrder.

Problem
When using commerce-sdk-react hooks like useOrder with expand: 'oms', the parameter is filtered out by pickValidParams() because it's not in the allowed parameter list.

Solution
Add expand to the getOrder paramKeys in the ShopperOrders API definition.

Changes:

  1. Shopper Orders API (shopper-orders-oas-v1-public.yaml)

    • Added expand query parameter to the getOrder endpoint
    • Added expand parameter definition in components/parameters section
  2. Shopper Customers API (shopper-customers-oas-v1-public.yaml)

    • Added expand query parameter to the getCustomerOrders endpoint
    • Added expand parameter definition in components/parameters section

Parameter Details:

  • Name: expand
  • Type: string
  • Required: false
  • Example: oms
  • Description: Expand options for the order

Example Usage:

Get Order:
GET /organizations/{organizationId}/orders/{orderNo}?siteId=RefArch&expand=oms

Get Customer Orders:
GET /organizations/{organizationId}/customers/{customerId}/orders?siteId=RefArch&expand=oms

Files Changed:

  • apis/shopper-orders-oas-1.5.1/shopper-orders-oas-v1-public.yaml
  • apis/shopper-customers-oas-1.1.2/shopper-customers-oas-v1-public.yaml

@sf-deepali-bharmal sf-deepali-bharmal requested a review from a team as a code owner January 13, 2026 21:15
Copy link
Contributor

@alexvuong alexvuong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be aware that these oas files are auto generated and will be replaced on each release. If you want the change to be applied to this library, please check if the api has been released to anypoint exchange api where we pull the OAS data and build this package from there.

If the changes you want are already in anypoint exchange, we can make another release to publish the change in this package. Please see release schedule for isomorphic here https://salesforce-internal.slack.com/archives/C08RM5UV613/p1768250593862989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants