Skip to content
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

Document proposed shipping methods v3 API #503

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 137 additions & 5 deletions reference/shipping.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,89 @@ servers:
description: Permanent ID of the BigCommerce store.
description: BigCommerce API Gateway
paths:
'/shipping/methods':
parameters:
- $ref: '#/components/parameters/Accept'

get:
operationId: getShippingMethods
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/shippingMethods'
meta:
type: object
properties:
cursor_pagination:
$ref: '#/components/schemas/cursorPagination'
description: |-
Get information about all shipping methods.

This list can be filtered to return shipping method objects specific to a list of requested shipping zones or channels, or filtered by method name.

```http
GET /shipping/methods?shipping_zone_id:in=4,5,6&channel_id:in=1,2,3&name:like=Express
```

tags:
- Shipping Methods
summary: Get Shipping Methods
parameters:
- in: query
name: 'shipping_zone_id:in'
description: 'A comma-separated list of shipping zone IDs. For more information, see [Filtering](/docs/start/about/common-query-params).'
style: form
explode: false
schema:
type: array
items:
type: integer
- in: query
name: 'channel_id:in'
description: 'A comma-separated list of channel IDs. For more information, see [Filtering](/docs/start/about/common-query-params).'
style: form
explode: false
schema:
type: array
items:
type: integer
- in: query
name: 'name:like'
description: 'A name by which to filter shipping methods. For more information, see [Filtering](/docs/start/about/common-query-params).'
schema:
type: string
- in: query
name: limit
description: 'The maximum number of records to return.'
required: false
schema:
type: integer
- in: query
name: cursor
description: 'A cursor pointing to the desired set of entities.'
required: false
schema:
type: string
- in: query
name: include
description: |-
* `shipping_zone` - Include shipping zone information with each shipping method.
style: form
explode: false
schema:
type: array
items:
type: string
enum:
- shipping_zone
'/shipping/products/customs-information':
parameters:
- $ref: '#/components/parameters/Accept'
Expand Down Expand Up @@ -323,7 +406,6 @@ components:
title: customsInformationRequest
description: Data about the customs information object.
type: object
x-internal: false
properties:
product_id:
description: The product ID to which the customs information data applies.
Expand Down Expand Up @@ -355,11 +437,44 @@ components:
- commodity_description
- international_shipping
- hs_codes
shippingMethods:
title: shippingMethods
description: A configured method that will produce shipping quotes for the associated zone and channels.
type: object
properties:
id:
description: The unique identifier of the shipping method.
type: integer
format: int32
example: 2
name:
description: The human-readable name of the shipping method.
type: string
example: "Courier delivery"
shipping_zone:
description: Zone information. This is available only when "include=shipping_zone" is present in the querystring.
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a sensible optional include 👌

type: object
properties:
id:
description: The unique identifier of the shipping zone.
type: integer
format: int32
example: 2
name:
description: The human-readable name of the shipping zone.
type: string
example: "Thailand"
channel_ids:
description: List of channel IDs for which this method is applicable.
type: array
items:
type: integer
format: int32
example: 3
customsInformation:
title: customsInformation
description: Data about the customs information object.
type: object
x-internal: false
properties:
product_id:
description: The ID of the product which the customs information data will apply to.
Expand Down Expand Up @@ -415,7 +530,6 @@ components:
CA: '508313'
US: '641000'
AU: '817355'
x-internal: false
metaCollection:
title: metaCollection
description: Meta data relating to pagination.
Expand Down Expand Up @@ -459,11 +573,29 @@ components:
type: string
description: Query string appended to the resource to show the current page.
example: '?limit=1&page=2'
x-internal: false
cursorPagination:
title: cursorPagination
description: Metadata relating to cursor-based pagination.
type: object
properties:
has_previous:
type: boolean
example: true
has_next:
type: boolean
example: true
previous:
type: string
example: "/shipping/methods?cursor=eyJsaW1pdCI6MzAsImZpbHRlciI6ImJsYWgiLCJhZnRlcl9pZCI6M30K"
current:
type: string
example: "/shipping/methods?cursor=eyJsaW1pdCI6MzAsImZpbHRlciI6ImJsYWgiLCJhZnRlcl9pZCI6M30K"
next:
type: string
example: "/shipping/methods?cursor=eyJsaW1pdCI6MzAsImZpbHRlciI6ImJsYWgiLCJhZnRlcl9pZCI6M30K"
error_Full:
title: Error
description: ''
type: object
properties: {}
additionalProperties: true
x-internal: false
Loading