openapi: 3.1.0
info:
  title: 'Admin Management: Store Information V3'
  version: 1.0.0
paths:
  /stores/{store_hash}/v3/store/metafields:
    get:
      operationId: getStoreMetafields
      summary: List Store Metafields
      description: Gets all store `metafields`.
      tags:
        - batchMetafields
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            Specifies the page number in a limited (paginated) list of products.
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          description: |
            Controls the number of items per page in a limited (paginated) list of products.
          required: false
          schema:
            type: integer
        - name: key
          in: query
          description: Filter based on a metafieldʼs key.
          required: false
          schema:
            type: string
        - name: key:in
          in: query
          description: Filter based on comma-separated metafieldʼs keys. Could be used with vanilla `key` query parameter.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: namespace
          in: query
          description: Filter based on a metafieldʼs namespaces.
          required: false
          schema:
            type: string
        - name: namespace:in
          in: query
          description: >-
            Filter based on comma-separated metafieldʼs namespaces. Could be used with vanilla `namespace` query
            parameter
          required: false
          schema:
            type: array
            items:
              type: string
        - name: include_fields
          in: query
          description: Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/StoreMetafieldsGetParametersIncludeFieldsSchemaItems'
        - name: date_modified:min
          in: query
          description: >
            'Query parameter that lets you filter by the minimum date modified, for example, `2024-05-14T09:34:00`,
            `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified after this date.'
          required: false
          schema:
            type: string
        - name: date_modified:max
          in: query
          description: >
            'Query parameter that lets you filter by the maximum date modified, for example, `2024-05-14T09:34:00`,
            `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified before this date.'
          required: false
          schema:
            type: string
        - name: date_created:min
          in: query
          description: >
            'Query parameter that lets you filter by the minimum date created, for example, `2024-05-14T09:34:00`,
            `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields created after this date.'
          required: false
          schema:
            type: string
        - name: date_created:max
          in: query
          description: >
            'Query parameter that lets you filter by the maximum date created, for example, `2024-05-14T09:34:00`,
            `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields created before this date.'
          required: false
          schema:
            type: string
        - name: direction
          in: query
          description: |
            Sort direction. Acceptable values are: `asc`, `desc`.
          required: false
          schema:
            $ref: '#/components/schemas/StoreMetafieldsGetParametersDirection'
        - name: before
          in: query
          description: >-
            A cursor indicating where to start retrieving the previous page of results. Use this parameter to paginate
            backward. Not required for the initial request. For subsequent requests, use the end_cursor value returned
            in meta.cursor_pagination from the previous response. Works with limit, direction, and other supported query
            parameters. When specified, offset-based pagination (page) is ignored. Cannot be used in combination with
            the after parameter.
          required: false
          schema:
            type: string
        - name: after
          in: query
          description: >-
            A cursor indicating where to start retrieving the next page of results. Use this parameter to paginate
            forward. Not required for the initial request. For subsequent requests, use the start_cursor value returned
            in meta.cursor_pagination from the previous response. Works with limit, direction, and other supported query
            parameters. When specified, offset-based pagination (page) is ignored. Cannot be used in combination with
            the before parameter.
          required: false
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes


            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            |  Information & Settings | modify | `store_v2_information` |

            |  Information & Settings | read-only | `store_v2_information_read_only` |


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our
            [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see our [Guide to API
            Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: |
            List of `Metafield` objects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldCollectionResponse_Batch'
    post:
      operationId: createStoresMetafields
      summary: Create Multiple Metafields
      description: Create multiple `metafields`.
      tags:
        - batchMetafields
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes


            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            |  Information & Settings | modify | `store_v2_information` |

            |  Information & Settings | read-only | `store_v2_information_read_only` |


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our
            [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see our [Guide to API
            Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: |
            List of created `Metafield` objects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldCollectionResponse_Batch_POST_PUT'
        '422':
          description: |
            Response object for metafields creation with partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldCollectionResponsePartialSuccess_POST_PUT'
      requestBody:
        description: A `metafield` object.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/MetafieldBase_Post_Put'
    put:
      operationId: updateStoreMetafields
      summary: Update Multiple Metafields
      description: Update multiple metafields.
      tags:
        - batchMetafields
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes


            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            |  Information & Settings | modify | `store_v2_information` |

            |  Information & Settings | read-only | `store_v2_information_read_only` |


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our
            [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see our [Guide to API
            Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Response payload for the BigCommerce API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldCollectionResponse_Batch_POST_PUT'
        '400':
          description: Bad Request. Input is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateStoreMetafieldsRequestBadRequestError'
        '422':
          description: |
            Response object for metafields creation with partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldCollectionResponsePartialSuccess_POST_PUT'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/StoreMetafieldsPutRequestBodyContentApplicationJsonSchemaItems'
    delete:
      operationId: deleteStoreMetafields
      summary: Delete Multiple Metafields
      description: Delete all store metafields.
      tags:
        - batchMetafields
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes


            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            |  Information & Settings | modify | `store_v2_information` |

            |  Information & Settings | read-only | `store_v2_information_read_only` |


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our
            [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see our [Guide to API
            Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: |
            Response object for metafields deletion with success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldCollectionDeleteResponseSuccess'
      requestBody:
        description: Metafields ID list.
        content:
          application/json:
            schema:
              type: array
              items:
                type: integer
  /stores/{store_hash}/v3/store/metafields/{metafieldId}:
    get:
      operationId: getStoreMetafield
      summary: Get Store Metafield
      description: Gets a store `metafield`.
      tags:
        - metafields
      parameters:
        - name: metafieldId
          in: path
          description: |
            The ID of the `Metafield`.
          required: true
          schema:
            type: integer
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes


            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            |  Information & Settings | modify | `store_v2_information` |

            |  Information & Settings | read-only | `store_v2_information_read_only` |


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our
            [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see our [Guide to API
            Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: false
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: |
            A `Metafield` object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetafieldResponse'
        '404':
          description: |
            Not found (A metafield was not found with this query).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
    put:
      operationId: updateStoreMetafield
      summary: Update Store Metafield
      description: |
        Update a store `Metafield`.
      tags:
        - metafields
      parameters:
        - name: metafieldId
          in: path
          description: |
            The ID of the `Metafield`.
          required: true
          schema:
            type: integer
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes


            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            |  Information & Settings | modify | `store_v2_information` |

            |  Information & Settings | read-only | `store_v2_information_read_only` |


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our
            [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see our [Guide to API
            Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: false
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: |
            A metafield and metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldCollectionResponse'
        '404':
          description: |
            The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      requestBody:
        description: |
          A `Metafield` object.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetafieldBase_Post_Put'
    delete:
      operationId: deleteStoreMetafield
      summary: Delete Metafield
      description: |
        Deletes a store `Metafield`.
      tags:
        - metafields
      parameters:
        - name: metafieldId
          in: path
          description: |
            The ID of the `Metafield`.
          required: true
          schema:
            type: integer
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes


            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            |  Information & Settings | modify | `store_v2_information` |

            |  Information & Settings | read-only | `store_v2_information_read_only` |


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our
            [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see our [Guide to API
            Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: false
          schema:
            type: string
            default: application/json
      responses:
        '204':
          description: |
            An empty response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '404':
          description: |
            Not found (A metafield was not found with this query).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
servers:
  - url: https://api.bigcommerce.com
    description: https://api.bigcommerce.com
components:
  schemas:
    StoreMetafieldsGetParametersIncludeFieldsSchemaItems:
      type: string
      enum:
        - resource_id
        - key
        - value
        - namespace
        - permission_set
        - resource_type
        - description
        - owner_client_id
        - date_created
        - date modified
      title: StoreMetafieldsGetParametersIncludeFieldsSchemaItems
    StoreMetafieldsGetParametersDirection:
      type: string
      enum:
        - asc
        - desc
      title: StoreMetafieldsGetParametersDirection
    MetafieldBasePermissionSet:
      type: string
      enum:
        - app_only
        - read
        - write
        - read_and_sf_access
        - write_and_sf_access
      description: |
        Determines the visibility and writeability of the field by other API consumers.

        | Value | Description |
        | :--- | :--- |
        | `app_only` | Private to the app that owns the field. |
        | `read` | Visible to other API consumers. |
        | `write` | Open for reading and writing by other API consumers. |
        | `read_and_sf_access` | Visible to other API consumers, including on the storefront. |
        | `write_and_sf_access` | Open for reading and writing by other API consumers, including on the storefront. |
      title: MetafieldBasePermissionSet
    MetafieldBaseResourceType:
      type: string
      enum:
        - brand
        - product
        - variant
        - category
        - cart
        - store
      description: |
        The type of resource with which the metafield is associated.
      title: MetafieldBaseResourceType
    Metafield:
      type: object
      properties:
        permission_set:
          $ref: '#/components/schemas/MetafieldBasePermissionSet'
          description: >
            Determines the visibility and writeability of the field by other API consumers.


            | Value | Description |

            | :--- | :--- |

            | `app_only` | Private to the app that owns the field. |

            | `read` | Visible to other API consumers. |

            | `write` | Open for reading and writing by other API consumers. |

            | `read_and_sf_access` | Visible to other API consumers, including on the storefront. |

            | `write_and_sf_access` | Open for reading and writing by other API consumers, including on the storefront.
            |
        namespace:
          type: string
          description: |
            Namespace for the metafield, for organizational purposes.
        key:
          type: string
          description: |
            The name of the field, for example: `location_id`, `color`.
        value:
          type: string
          description: |
            The value of the field, for example: `1`, `blue`.
        description:
          type: string
          description: |
            Description for the metafields.
        resource_type:
          $ref: '#/components/schemas/MetafieldBaseResourceType'
          description: |
            The type of resource with which the metafield is associated.
        resource_id:
          type: string
          description: |
            The unique identifier for the resource with which the metafield is associated.
        id:
          type: string
          description: The unique identifier for the metafield.
        date_created:
          type: string
          format: date-time
          description: Date and time of the metafieldʼs creation.
        date_modified:
          type: string
          format: date-time
          description: Date and time when the metafield was last updated.
        owner_client_id:
          type: string
          description: Client ID for the metafieldʼs creator.
      required:
        - permission_set
      description: |
        Allows app partners to write custom data to various resources in the API.
      title: Metafield
    PaginationLinks:
      type: object
      properties:
        previous:
          type: string
          description: |
            Link to the previous page returned in the response.
        current:
          type: string
          description: |
            Link to the current page returned in the response.
        next:
          type: string
          description: |
            Link to the next page returned in the response.
      description: |
        Pagination links for the previous and next parts of the whole collection.
      title: PaginationLinks
    Pagination:
      type: object
      properties:
        total:
          type: integer
          description: |
            Total number of items in the result set.
        count:
          type: integer
          description: |
            Total number of items in the collection response.
        per_page:
          type: integer
          description: |
            The amount of items returned in the collection per page, controlled by the limit parameter.
        current_page:
          type: integer
          description: |
            The page you are currently on within the collection.
        total_pages:
          type: integer
          description: |
            The total number of pages in the collection.
        links:
          $ref: '#/components/schemas/PaginationLinks'
          description: |
            Pagination links for the previous and next parts of the whole collection.
      description: Data about the response, including pagination and collection totals.
      title: Pagination
    CursorPaginationLinks:
      type: object
      properties:
        previous:
          type: string
          description: |
            Cursor to the previous page returned in the response.
        current:
          type: string
          description: |
            Cursor to the current page returned in the response.
        next:
          type: string
          description: |
            Cursor to the next page returned in the response.
      description: |
        Pagination links for the previous and next parts of the whole collection.
      title: CursorPaginationLinks
    CursorPagination:
      type: object
      properties:
        count:
          type: integer
          description: |
            Total number of items in the collection response.
        per_page:
          type: integer
          description: |
            The amount of items returned in the collection per page, controlled by the limit parameter.
        start_cursor:
          type: string
          description: |
            Cursor that is referring to a start of current page.
        end_cursor:
          type: string
          description: |
            Cursor that is referring to a end of current page. Should be used to fetch next page.
        links:
          $ref: '#/components/schemas/CursorPaginationLinks'
          description: |
            Pagination links for the previous and next parts of the whole collection.
      description: Data about the response, including cursor pagination and collection totals.
      title: CursorPagination
    CollectionMeta:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        cursor_pagination:
          $ref: '#/components/schemas/CursorPagination'
      description: Data about the response, including pagination and collection totals.
      title: CollectionMeta
    MetaFieldCollectionResponse_Batch:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Metafield'
        meta:
          $ref: '#/components/schemas/CollectionMeta'
      description: |
        Response payload for the BigCommerce API.
      title: MetaFieldCollectionResponse_Batch
    MetafieldBasePostPutPermissionSet:
      type: string
      enum:
        - app_only
        - read
        - write
        - read_and_sf_access
        - write_and_sf_access
      description: |
        Determines the visibility and writeability of the field by other API consumers.

        | Value | Description |
        | :--- | :--- |
        | `app_only` | Private to the app that owns the field. |
        | `read` | Visible to other API consumers. |
        | `write` | Open for reading and writing by other API consumers. |
        | `read_and_sf_access` | Visible to other API consumers, including on the storefront. |
        | `write_and_sf_access` | Open for reading and writing by other API consumers, including on the storefront. |
      title: MetafieldBasePostPutPermissionSet
    MetafieldBase_Post_Put:
      type: object
      properties:
        permission_set:
          $ref: '#/components/schemas/MetafieldBasePostPutPermissionSet'
          description: >
            Determines the visibility and writeability of the field by other API consumers.


            | Value | Description |

            | :--- | :--- |

            | `app_only` | Private to the app that owns the field. |

            | `read` | Visible to other API consumers. |

            | `write` | Open for reading and writing by other API consumers. |

            | `read_and_sf_access` | Visible to other API consumers, including on the storefront. |

            | `write_and_sf_access` | Open for reading and writing by other API consumers, including on the storefront.
            |
        namespace:
          type: string
          description: |
            Namespace for the metafield, for organizational purposes.
        key:
          type: string
          description: |
            The name of the field, for example: `location_id`, `color`.
        value:
          type: string
          description: |
            The value of the field, for example: `1`, `blue`.
        description:
          type: string
          description: |
            Description for the metafields.
      required:
        - permission_set
        - namespace
        - key
        - value
      description: |
        Common Metafield properties.
      title: MetafieldBase_Post_Put
    WriteCollectionSuccessMeta:
      type: object
      properties:
        total:
          type: integer
          description: |
            Total number of items in the result set.
        success:
          type: integer
          description: |
            Total number of items that were successfully deleted.
        failed:
          type: integer
          description: |
            Total number of items that failed to be deleted.
      description: Additional data about the response.
      title: WriteCollectionSuccessMeta
    MetaFieldCollectionResponse_Batch_POST_PUT:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Metafield'
        errors:
          type: array
          items:
            description: Any type
          description: Empty for 200 responses.
        meta:
          $ref: '#/components/schemas/WriteCollectionSuccessMeta'
      description: |
        Response payload for the BigCommerce API.
      title: MetaFieldCollectionResponse_Batch_POST_PUT
    ErrorDetail:
      type: object
      properties: {}
      description: |
        Error detail response payload for the BigCommerce API.
      title: ErrorDetail
    Error:
      type: object
      properties:
        status:
          type: integer
          description: |
            The HTTP status code for the error.
        title:
          type: string
          description: |
            The error title.
        type:
          type: string
          description: |
            The error type.
        errors:
          $ref: '#/components/schemas/ErrorDetail'
      description: |
        Error response payload for the BigCommerce API.
      title: Error
    WriteCollectionPartialSuccessMeta:
      type: object
      properties:
        total:
          type: integer
          description: |
            Total number of items in the result set.
        success:
          type: integer
          description: |
            Total number of items that were successfully deleted.
        failed:
          type: integer
          description: |
            Total number of items that failed to be deleted.
      description: Additional data about the response.
      title: WriteCollectionPartialSuccessMeta
    MetaFieldCollectionResponsePartialSuccess_POST_PUT:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Metafield'
          description: Empty for 200 responses.
        errors:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/WriteCollectionPartialSuccessMeta'
      description: |
        Response payload for the BigCommerce API.
      title: MetaFieldCollectionResponsePartialSuccess_POST_PUT
    StoreMetafieldsPutRequestBodyContentApplicationJsonSchemaItemsPermissionSet:
      type: string
      enum:
        - app_only
        - read
        - write
        - read_and_sf_access
        - write_and_sf_access
      description: |
        Determines the visibility and writeability of the field by other API consumers.

        | Value | Description |
        | :--- | :--- |
        | `app_only` | Private to the app that owns the field. |
        | `read` | Visible to other API consumers. |
        | `write` | Open for reading and writing by other API consumers. |
        | `read_and_sf_access` | Visible to other API consumers, including on the storefront. |
        | `write_and_sf_access` | Open for reading and writing by other API consumers, including on the storefront. |
      title: StoreMetafieldsPutRequestBodyContentApplicationJsonSchemaItemsPermissionSet
    StoreMetafieldsPutRequestBodyContentApplicationJsonSchemaItems:
      type: object
      properties:
        permission_set:
          $ref: '#/components/schemas/StoreMetafieldsPutRequestBodyContentApplicationJsonSchemaItemsPermissionSet'
          description: >
            Determines the visibility and writeability of the field by other API consumers.


            | Value | Description |

            | :--- | :--- |

            | `app_only` | Private to the app that owns the field. |

            | `read` | Visible to other API consumers. |

            | `write` | Open for reading and writing by other API consumers. |

            | `read_and_sf_access` | Visible to other API consumers, including on the storefront. |

            | `write_and_sf_access` | Open for reading and writing by other API consumers, including on the storefront.
            |
        namespace:
          type: string
          description: |
            Namespace for the metafield, for organizational purposes.
        key:
          type: string
          description: |
            The name of the field, for example: `location_id`, `color`.
        value:
          type: string
          description: |
            The value of the field, for example: `1`, `blue`.
        description:
          type: string
          description: |
            Description for the metafields.
        id:
          type: integer
          description: |
            The ID of metafield to update.
      required:
        - permission_set
        - namespace
        - key
        - value
        - id
      description: |
        Common Metafield properties.
      title: StoreMetafieldsPutRequestBodyContentApplicationJsonSchemaItems
    UpdateStoreMetafieldsRequestBadRequestError:
      type: object
      properties:
        status:
          type: number
          format: double
        title:
          type: string
        type:
          type: string
        detail:
          type: string
      title: UpdateStoreMetafieldsRequestBadRequestError
    MetaFieldCollectionDeleteResponseSuccess:
      type: object
      properties:
        data:
          type: array
          items:
            type: integer
        errors:
          type: array
          items:
            description: Any type
          description: Empty for 200 responses.
        meta:
          $ref: '#/components/schemas/WriteCollectionSuccessMeta'
      description: |
        Response payload for the BigCommerce API.
      title: MetaFieldCollectionDeleteResponseSuccess
    metaCollection_open:
      type: object
      properties: {}
      description: Response metadata.
      title: metaCollection_open
    MetafieldResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Metafield'
        meta:
          $ref: '#/components/schemas/metaCollection_open'
      description: |
        Response payload for the BigCommerce API.
      title: MetafieldResponse
    NotFound:
      type: object
      properties:
        status:
          type: integer
          description: |
            404 HTTP status code.
        title:
          type: string
          description: The error title describing the particular error.
        type:
          type: string
      description: Error payload for the BigCommerce API.
      title: NotFound
    MetaFieldCollectionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Metafield'
        meta:
          $ref: '#/components/schemas/metaCollection_open'
      description: |
        Response payload for the BigCommerce API.
      title: MetaFieldCollectionResponse
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        ### OAuth scopes


        | UI Name | Permission | Parameter |

        |:--------|:-----------|:----------|

        |  Information & Settings | modify | `store_v2_information` |

        |  Information & Settings | read-only | `store_v2_information_read_only` |


        ### Authentication header


        | Header | Argument | Description |

        |:-------|:---------|:------------|

        | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to
        API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |


        ### Further reading


        For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example
        Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


        For more about BigCommerce OAuth scopes, see our [Guide to API
        Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


        For a list of API status codes, see [API Status
        Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
