Skip to content

DEVDOCS-6253 - Content Refresh - "Orders" (Storefront) #975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bc-Vince
Copy link
Contributor

@bc-Vince bc-Vince commented Jun 12, 2025

Reformatted file with reusable schemas.
Added new copy.
Added missing fields and parameters.
Called out legacy extra fields.

DEVDOCS-6253

What changed?

  • Introduction presents helpful usage information, including the Company user permissions needed for the user associated with the storefront authToken.
  • Endpoints now include summaries with usage information.
  • Request and response bodies are up-to-date, showing all available fields and parameters.
  • YAML file is organized into several schema to reduce redundant text lines and improve efficiency for subsequent edits.

Release notes draft

  • As part of our ongoing content refresh for B2B Edition developer documentation, we've fully refreshed the Server-to-Server Quotes documentation. This includes
    • New, thorough descriptive copy
    • Explanation of legacy information fields
    • INclusion of previously-missing fields for all endpoints

Anything else?

ping @bc-terra

Reformatted file with reusable schemas.
Added new copy.
Added missing fields and parameters.
Called out legacy extra fields.
@bc-Vince bc-Vince added the ready for review This PR is complete and awaiting a review. label Jun 12, 2025
Comment on lines +306 to +315
- $ref: "#/components/schemas/responseSuccess"
- properties:
data:
type: array
items:
properties:
orderId:
$ref: '#/components/schemas/orderId'
required:
- orderId
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- $ref: "#/components/schemas/responseSuccess"
- properties:
data:
type: array
items:
properties:
orderId:
$ref: '#/components/schemas/orderId'
required:
- orderId
- $ref: "#/components/schemas/responseArray"
- properties:
data:
items:
properties:
orderId:
$ref: '#/components/schemas/orderId'
required:
- orderId

Changing the schema to one I'll add in another comment. Also removing redundancies and adjusting alignment on the required list

Comment on lines +374 to +390
- $ref: "#/components/schemas/responseSuccess"
- properties:
data:
type: array
items:
type: object
properties:
orderId:
$ref: '#/components/schemas/orderId'
imageUrl:
type: string
minLength: 1
description: The image URL for a product in the order.
example: "https://mybcstore.com/images/products/12345/main.jpg"
required:
- orderId
- imageUrl
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- $ref: "#/components/schemas/responseSuccess"
- properties:
data:
type: array
items:
type: object
properties:
orderId:
$ref: '#/components/schemas/orderId'
imageUrl:
type: string
minLength: 1
description: The image URL for a product in the order.
example: "https://mybcstore.com/images/products/12345/main.jpg"
required:
- orderId
- imageUrl
- $ref: "#/components/schemas/responseArray"
- properties:
data:
items:
properties:
orderId:
$ref: '#/components/schemas/orderId'
imageUrl:
type: string
minLength: 1
description: The image URL for a product in the order.
example: "https://mybcstore.com/images/products/12345/main.jpg"
required:
- orderId
- imageUrl

See note above for rationale

Comment on lines +416 to +434
- $ref: "#/components/schemas/responseSuccess"
- properties:
data:
type: array
items:
type: object
properties:
productId:
$ref: '#/components/schemas/productId'
quantity:
$ref: '#/components/schemas/quantity'
variantId:
$ref: '#/components/schemas/variantId'
optionList:
$ref: '#/components/schemas/optionList_SIMPLE'
required:
- productId
- quantity
- variantId
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- $ref: "#/components/schemas/responseSuccess"
- properties:
data:
type: array
items:
type: object
properties:
productId:
$ref: '#/components/schemas/productId'
quantity:
$ref: '#/components/schemas/quantity'
variantId:
$ref: '#/components/schemas/variantId'
optionList:
$ref: '#/components/schemas/optionList_SIMPLE'
required:
- productId
- quantity
- variantId
- $ref: "#/components/schemas/responseArray"
- properties:
data:
items:
properties:
productId:
$ref: '#/components/schemas/productId'
quantity:
$ref: '#/components/schemas/quantity'
variantId:
$ref: '#/components/schemas/variantId'
optionList:
$ref: '#/components/schemas/optionList_SIMPLE'
required:
- productId
- quantity
- variantId

See note above for rationale

Comment on lines +2391 to +2404
responseObject:
type: object
properties:
code:
type: integer
description: "HTTP Response Code"
default: '200'
message:
type: string
description: "Response message"
default: 'SUCCESS'
data:
type: object
responseSuccess:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
responseObject:
type: object
properties:
code:
type: integer
description: "HTTP Response Code"
default: '200'
message:
type: string
description: "Response message"
default: 'SUCCESS'
data:
type: object
responseSuccess:
responseObject:
type: object
properties:
code:
type: integer
description: "HTTP Response Code"
default: '200'
message:
type: string
description: "Response message"
default: 'SUCCESS'
data:
type: object
responseArray:
type: object
properties:
code:
type: integer
description: "HTTP Response Code"
default: '200'
message:
type: string
description: "Response message"
default: 'SUCCESS'
data:
type: array
items:
type: object
responseSuccess:

Adding this schema to support the other three suggestions.
Without these four adjustments, it works fine in Swagger, but our own renderer gets lost in the muck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is complete and awaiting a review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants