From 85e5478873bd855a98bd948183f4ef1372da4ba4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 09:47:04 +0000 Subject: [PATCH] chore(docs): Updated API Reference (#6831) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com> --- .../specs/admin/openapi.full.yaml | 37 +++++++++++++++++++ .../paths/admin_products_{id}_variants.yaml | 24 ++++++++++++ .../specs/admin/paths/admin_variants.yaml | 19 ++++++++++ 3 files changed, 80 insertions(+) diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml index 1075400224..5930cedad7 100644 --- a/www/apps/api-reference/specs/admin/openapi.full.yaml +++ b/www/apps/api-reference/specs/admin/openapi.full.yaml @@ -17037,6 +17037,28 @@ paths: description: Filter product variants by whether they are allowed to be backordered or not. schema: type: boolean + - in: query + name: inventory_quantity + description: Filter by available inventory quantity + schema: + oneOf: + - type: number + description: a specific number to filter by. + - type: object + description: filter using less and greater than comparisons. + properties: + lt: + type: number + description: filter by inventory quantity less than this number + gt: + type: number + description: filter by inventory quantity greater than this number + lte: + type: number + description: filter by inventory quantity less than or equal to this number + gte: + type: number + description: filter by inventory quantity greater than or equal to this number - in: query name: created_at description: Filter by a creation date range. @@ -26497,6 +26519,21 @@ paths: schema: type: number default: '100' + - in: query + name: order + description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. + schema: + type: string + - in: query + name: manage_inventory + description: Filter product variants by whether their inventory is managed or not. + schema: + type: boolean + - in: query + name: allow_backorder + description: Filter product variants by whether they are allowed to be backordered or not. + schema: + type: boolean - in: query name: cart_id style: form diff --git a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants.yaml b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants.yaml index eeb7ac3fde..1d892c04cb 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_products_{id}_variants.yaml @@ -69,6 +69,30 @@ get: not. schema: type: boolean + - in: query + name: inventory_quantity + description: Filter by available inventory quantity + schema: + oneOf: + - type: number + description: a specific number to filter by. + - type: object + description: filter using less and greater than comparisons. + properties: + lt: + type: number + description: filter by inventory quantity less than this number + gt: + type: number + description: filter by inventory quantity greater than this number + lte: + type: number + description: filter by inventory quantity less than or equal to this number + gte: + type: number + description: >- + filter by inventory quantity greater than or equal to this + number - in: query name: created_at description: Filter by a creation date range. diff --git a/www/apps/api-reference/specs/admin/paths/admin_variants.yaml b/www/apps/api-reference/specs/admin/paths/admin_variants.yaml index ee84257124..e8603018f6 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_variants.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_variants.yaml @@ -47,6 +47,25 @@ get: schema: type: number default: '100' + - in: query + name: order + description: >- + The field to sort the data by. By default, the sort order is ascending. + To change the order to descending, prefix the field name with `-`. + schema: + type: string + - in: query + name: manage_inventory + description: Filter product variants by whether their inventory is managed or not. + schema: + type: boolean + - in: query + name: allow_backorder + description: >- + Filter product variants by whether they are allowed to be backordered or + not. + schema: + type: boolean - in: query name: cart_id style: form