B2B order data in the Storefront GraphQL API

Authenticated B2B company users can now read company orders and B2B order details through the Storefront GraphQL API, so a single storefront graph can serve both B2C and B2B order experiences.

Storefront GraphQL

  • Company order queries: the orders field on the ActiveCompany type returns orders placed on the current storefront channel by any user in the shopper’s active company, with cursor pagination, filtering, and sorting.
  • B2B order fields: orders add poNumber, reference, company, placedBy, invoice, history, and extraFields. These fields require a B2B storefront token.

For example queries, see the Orders guide, or browse the Storefront GraphQL API reference for schema details.


Per-code coupon scheduling for bulk coupon promotions

The Promotions V3 API now supports a custom validity window on each coupon code of a bulk coupon promotion. A code with no custom window inherits the schedule of its parent promotion.

Promotions V3

  • Code schedule: the CouponCode object has a new nullable schedule object with valid_from and valid_until fields.
  • Generate codes with a schedule: the Generate Multiple Coupon Codes endpoint (/codegen) accepts an optional schedule object and applies it to every generated code.
  • Filter codes by schedule: the List Coupon Codes endpoint accepts the new valid_from:min and valid_until:max query filters. The values are Unix timestamps.
  • Reschedule codes in bulk: the new PUT /promotions/{promotion_id}/reschedulecodes endpoint updates the validity window of up to 250 codes in one request. Send schedule: null to reset the codes to the promotion schedule.

For details, see the Promotions API reference.