openapi: 3.0.0
info:
  title: Shops
  version: 2.0.0
  description: |-
    This API allows you to get information about your shop.

    Refer to the <a href="https://developer.boldcommerce.com/changelog">changelog</a> for the latest updates to this API.
  termsOfService: https://boldcommerce.com/terms-of-service
  contact:
    name: Contact Us
    url: https://developer-dashboard.boldcommerce.com/default/contactus
servers:
  - url: https://api.boldcommerce.com
security:
  - OAuthToken:
      - read_shops
  - APIAccessToken: []
tags:
  - name: Integrations
    description: Manages integrations for a given shop.
  - name: Shops
    description: Contains information about a shop. Use these endpoints to retrieve information about a given shop.
paths:
  /integrations/v1/shops/{shop_identifier}/installs/{client_id}:
    parameters:
      - $ref: '#/components/parameters/shopIdentifier'
      - $ref: '#/components/parameters/clientId'
    delete:
      tags:
        - Integrations
      summary: Uninstall Integration
      operationId: UninstallIntegration
      description: Uninstalls a public integration for a specific shop by the issued `client_id`. For the `client_id`, use your public integration's Client ID value, which can be found in the [Developer Dashboard](https://developer-dashboard.boldcommerce.com/default/dashboard). The access token used to authenticate this request must belong to the public integration matching the given `client_id`. For more information, refer to [Build Public Integrations](/guides/checkout/public-integrations#exchange-code-for-an-api-access-token).
      security:
        - {}
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
        '403':
          description: The supplied credentials are not allowed to uninstall this integration on this shop, possibly because they were not used for the correlated install.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                uninstallForbidden:
                  $ref: '#/components/examples/uninstallForbidden'
        '404':
          description: The integration install specified by `client_id` was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                installationNotFound:
                  $ref: '#/components/examples/installationNotFound'
        '500':
          description: An unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultError'
              examples:
                internalError:
                  $ref: '#/components/examples/internalError'
  /shops/v1/info:
    get:
      summary: Get Shop Info
      operationId: GetShopInfo
      tags:
        - Shops
      description: Gets information about the current shop.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopInfo'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Missing Access Token:
                  value:
                    error: invalid_request
                    error_description: The access token is missing
                Invalid Or Expired Access Token:
                  value:
                    error: invalid_token
                    error_description: The access token is invalid or has expired
        '404':
          description: Shop Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultError'
              example:
                status_code: 404
                errors:
                  - not found
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultError'
              example:
                status_code: 500
                errors:
                  - internal error
components:
  securitySchemes:
    OAuthToken:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://apps.boldapps.net/accounts/dashboard/authorize
          tokenUrl: https://api.boldcommerce.com/auth/oauth2/token
          scopes:
            read_shops: Read shop information.
      description: Authenticates an API request from a [public integration](/guides/checkout/resources/glossary#public-integration). Generate this token in the [Developer Dashboard](https://developer-dashboard.boldcommerce.com/default/dashboard). Refer to [Build Public Integrations](/guides/checkout/public-integrations) for more information.
    APIAccessToken:
      type: apiKey
      name: API Access Token
      in: header
      description: Authenticates an API request from a [private integration](/guides/checkout/resources/glossary#private-integration). Generate this token in the [Bold Account Center](https://account.boldcommerce.com/). Refer to [Making API Calls](/guides/checkout/quick-start) for more information.
  schemas:
    ShopInfo:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Bold's internal-only shop identifier.
          example: 3654
        shop_identifier:
          type: string
          description: The platform-specific shop identifier. Use this value in all API calls to identify your store.
          example: zp3oafdor9
        organization_id:
          type: integer
          description: The shop organization ID. If `organization_id` is `0`, the shop is not connected to a Bold Account Center organization.
          example: 142
        shop_domain:
          type: string
          description: The shop domain.
          example: store-zp3oafdor9.mybigcommerce.com
        custom_domain:
          type: string
          description: The shop's custom domain.
          example: example.bigcommerce.com
        platform_slug:
          type: string
          description: The platform name. Possible values are "bigcommerce", "commercetools", "shopify", "woocommerce", and "custom".
          example: bigcommerce
        shop_owner:
          type: string
          description: The shop owner, taken from the shop platform.
          example: John Doe
        store_name:
          type: string
          description: The shop name, taken from the shop platform.
          example: acme-inc
        admin_email:
          type: string
          description: The email for the shop administrator, used when creating the shop.
          example: admin@example.com
        order_email:
          type: string
          description: The email used to send orders. Only used for BigCommerce.
          example: orders@example.com
        currency:
          type: string
          description: The shop's selected currency, using [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) standards.
          example: CAD
        currency_symbol:
          type: string
          description: The symbol of the shop currency.
          example: $
        money_format:
          type: string
          description: The format for displaying currency.
          example: ${{amount}}
        address:
          type: string
          description: The shop's street address.
          example: 50 Fultz Blvd
        address_2:
          type: string
          description: 'Any additional street address details (apt #, suite #, etc) for the shop.'
          example: Suite 200
        city:
          type: string
          description: The name of the shop's city.
          example: Winnipeg
        province:
          type: string
          description: The name of the shop's province.
          example: Manitoba
        country:
          type: string
          description: The name of the shop's country.
          example: Canada
        country_code:
          type: string
          description: The shop's country code, using [ISO-3166](https://www.iso.org/iso-3166-country-codes.html) format.
          example: CA
        postal_code:
          type: string
          description: The shop's postal/zip code. Required for most countries, including the United States, Canada, and Mexico.
          example: R3Y0L6
        timezone:
          type: string
          description: The shop timezone.
          example: America/New_York
        phone:
          type: string
          description: The phone number of the shop.
          example: '8005550101'
        locale:
          type: string
          description: The shop locale, in [ISO-639-1 format](https://www.iso.org/standard/22109.html).
          example: en
        plan_name:
          type: string
          description: The name of the shop's service plan. For more information on how Bold uses a shop's service plan, see the [rate limiting reference page](/guides/checkout/resources/rate-limiting#rate-limits-by-platform).
          example: Sandbox_Store
        plan_level:
          type: string
          description: The name of the shop's platform partner level. Possible values depend on the shop platform.
          example: affiliate
        platform_status:
          type: string
          description: The shop's platform status.
          example: active
        is_price_entered_with_tax:
          type: boolean
          description: If the price for a cart at checkout is entered with tax included.
          example: false
        weight_unit:
          type: string
          description: The abbreviated unit of measurement for weight of a shop product (e.g. "g", "lb", "oz".) If the shop does not sell physical items, the `weight_unit` is an empty string (`""`).
          example: ''
        created_at:
          type: string
          format: datetime
          description: The date and time the shop was created, in [RFC 3339, section 5.6 format](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
          example: '2023-03-01T03:00:48Z'
        updated_at:
          type: string
          format: datetime
          description: The date and time the shop was updated, in [RFC 3339, section 5.6 format](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
          example: '2023-03-30T03:00:48Z'
        platform_updated_at:
          type: string
          format: datetime
          description: The date and time the platform was updated, in [RFC 3339, section 5.6 format](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
          example: '2022-07-26T15:35:22Z'
        redacted_at:
          type: string
          format: datetime
          nullable: true
          description: The date and time the shop was redacted, in [RFC 3339, section 5.6 format](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6). This value is `null` if the store is not redacted.
          example: null
        sync_status:
          type: string
          description: The sync status between the shop and Bold.
        setup_required:
          type: boolean
          description: Indicates whether the shop requires setup.
          example: false
        password_enabled:
          type: boolean
          description: Indicates whether the shop requires a password for customers to access.
          example: false
        pre_launch_enabled:
          type: boolean
          description: Indicates whether pre-launch is enabled for the shop. Shopify only. See more information on the [Shopify pre-launch reference page](https://www.shopify.com/ca/blog/coming-soon-page).
          example: false
        has_storefront:
          type: boolean
          description: If the shop has a physical storefront.
          example: true
        base_url:
          type: string
          nullable: true
          description: The base URL for the shop. `base_url` is `null` if the shop does not have a custom accessible base URL.
          example: null
        api_base_url:
          type: string
          nullable: true
          description: The base API URL for the shop. `api_base_url` is `null` if the shop does not have an accessible API URL.
          example: null
        auth_base_url:
          type: string
          nullable: true
          description: The base authorization URL for the shop. `auth_base_url` is `null` if the shop does not have an accessible base authorization URL.
          example: null
        tax_rounding_mode:
          type: string
          nullable: true
          description: The tax rounding mode for the shop. `tax_rounding_mode` is `null` if no tax rounding mode is set.
          example: null
        inventory_control:
          type: string
          nullable: true
          description: The inventory control method for the shop. `inventory_control` is `null` if no inventory control method is set.
          example: null
        currency_precision:
          type: string
          nullable: true
          description: The currency precision setting for the shop. `currency_precision` is `null` if no currency precision value is set.
          example: null
        shop_enabled:
          type: boolean
          description: Indicates whether the shop is currently receiving traffic. Supported by BigCommerce and Shopify.
          example: true
        has_ac_shop_platform_creds:
          type: boolean
          description: Indicates whether the shop has shop platform credentials in Bold Account Center.
          example: true
    Error:
      type: object
      properties:
        error:
          type: string
          description: The error name.
          example: invalid_token
        error_description:
          type: string
          description: The error description.
          example: The access token is invalid or has expired
    DefaultError:
      type: object
      properties:
        status_code:
          type: integer
          description: The status code for the error.
          example: 404
        errors:
          type: array
          description: Any messages associated with the error.
          items:
            type: string
          example:
            - not found
  parameters:
    shopIdentifier:
      name: shop_identifier
      in: path
      description: Unique identifier of the store. Retrieve this information by calling the [Get Shop Info](shops#tag/Shop/operation/GetShopInfo) endpoint.
      required: true
      schema:
        type: string
      example: abc123def456
    clientId:
      name: client_id
      in: path
      description: Unique identifier of an integration installed on a store. Available in the response during the initial installation of an integration.
      required: true
      schema:
        type: string
      example: SEY7wXUZZHq57gjeKs4DmnHyeMsSO2AF
  examples:
    installationNotFound:
      value:
        status_code: 404
        errors:
          - Integration installation not found.
    uninstallForbidden:
      value:
        status_code: 403
        errors:
          - Failed to uninstall integration due to insufficient privileges
    internalError:
      value:
        status_code: 500
        errors:
          - Request failed due to an internal server error
