Commerce Layer markets API

resource type

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

commerce-layer-markets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Commerce Layer addresses markets API
  version: 7.10.1
  contact:
    name: API Support
    url: https://commercelayer.io
    email: support@commercelayer.io
  description: Headless Commerce for Global Brands.
servers:
- url: https://{your_organization_slug}.commercelayer.io/api
  description: API
- url: https://core.commercelayer.io/users/sign_in
  description: Sign in
- url: https://docs.commercelayer.io/api
  description: API reference
security:
- bearerAuth: []
tags:
- name: markets
  description: resource type
paths:
  /avalara_accounts/{avalaraAccountId}/markets:
    get:
      operationId: GET/avalaraAccountId/markets
      summary: Retrieve the markets associated to the avalara account
      description: Retrieve the markets associated to the avalara account
      tags:
      - markets
      parameters:
      - name: avalaraAccountId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the avalara account
  /bing_geocoders/{bingGeocoderId}/markets:
    get:
      operationId: GET/bingGeocoderId/markets
      summary: Retrieve the markets associated to the bing geocoder
      description: Retrieve the markets associated to the bing geocoder
      tags:
      - markets
      parameters:
      - name: bingGeocoderId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the bing geocoder
  /bundles/{bundleId}/market:
    get:
      operationId: GET/bundleId/market
      summary: Retrieve the market associated to the bundle
      description: Retrieve the market associated to the bundle
      tags:
      - markets
      parameters:
      - name: bundleId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the bundle
  /buy_x_pay_y_promotions/{buyXPayYPromotionId}/market:
    get:
      operationId: GET/buyXPayYPromotionId/market
      summary: Retrieve the market associated to the buy x pay y promotion
      description: Retrieve the market associated to the buy x pay y promotion
      tags:
      - markets
      parameters:
      - name: buyXPayYPromotionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the buy x pay y promotion
  /carrier_accounts/{carrierAccountId}/market:
    get:
      operationId: GET/carrierAccountId/market
      summary: Retrieve the market associated to the carrier account
      description: Retrieve the market associated to the carrier account
      tags:
      - markets
      parameters:
      - name: carrierAccountId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the carrier account
  /customer_groups/{customerGroupId}/markets:
    get:
      operationId: GET/customerGroupId/markets
      summary: Retrieve the markets associated to the customer group
      description: Retrieve the markets associated to the customer group
      tags:
      - markets
      parameters:
      - name: customerGroupId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the customer group
  /customers/{customerId}/jwt_markets:
    get:
      operationId: GET/customerId/jwt_markets
      summary: Retrieve the jwt markets associated to the customer
      description: Retrieve the jwt markets associated to the customer
      tags:
      - markets
      parameters:
      - name: customerId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The jwt_markets associated to the customer
  /discount_engines/{discountEngineId}/markets:
    get:
      operationId: GET/discountEngineId/markets
      summary: Retrieve the markets associated to the discount engine
      description: Retrieve the markets associated to the discount engine
      tags:
      - markets
      parameters:
      - name: discountEngineId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the discount engine
  /external_promotions/{externalPromotionId}/market:
    get:
      operationId: GET/externalPromotionId/market
      summary: Retrieve the market associated to the external promotion
      description: Retrieve the market associated to the external promotion
      tags:
      - markets
      parameters:
      - name: externalPromotionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the external promotion
  /external_tax_calculators/{externalTaxCalculatorId}/markets:
    get:
      operationId: GET/externalTaxCalculatorId/markets
      summary: Retrieve the markets associated to the external tax calculator
      description: Retrieve the markets associated to the external tax calculator
      tags:
      - markets
      parameters:
      - name: externalTaxCalculatorId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the external tax calculator
  /fixed_amount_promotions/{fixedAmountPromotionId}/market:
    get:
      operationId: GET/fixedAmountPromotionId/market
      summary: Retrieve the market associated to the fixed amount promotion
      description: Retrieve the market associated to the fixed amount promotion
      tags:
      - markets
      parameters:
      - name: fixedAmountPromotionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the fixed amount promotion
  /fixed_price_promotions/{fixedPricePromotionId}/market:
    get:
      operationId: GET/fixedPricePromotionId/market
      summary: Retrieve the market associated to the fixed price promotion
      description: Retrieve the market associated to the fixed price promotion
      tags:
      - markets
      parameters:
      - name: fixedPricePromotionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the fixed price promotion
  /free_gift_promotions/{freeGiftPromotionId}/market:
    get:
      operationId: GET/freeGiftPromotionId/market
      summary: Retrieve the market associated to the free gift promotion
      description: Retrieve the market associated to the free gift promotion
      tags:
      - markets
      parameters:
      - name: freeGiftPromotionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the free gift promotion
  /free_shipping_promotions/{freeShippingPromotionId}/market:
    get:
      operationId: GET/freeShippingPromotionId/market
      summary: Retrieve the market associated to the free shipping promotion
      description: Retrieve the market associated to the free shipping promotion
      tags:
      - markets
      parameters:
      - name: freeShippingPromotionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the free shipping promotion
  /geocoders/{geocoderId}/markets:
    get:
      operationId: GET/geocoderId/markets
      summary: Retrieve the markets associated to the geocoder
      description: Retrieve the markets associated to the geocoder
      tags:
      - markets
      parameters:
      - name: geocoderId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the geocoder
  /gift_cards/{giftCardId}/market:
    get:
      operationId: GET/giftCardId/market
      summary: Retrieve the market associated to the gift card
      description: Retrieve the market associated to the gift card
      tags:
      - markets
      parameters:
      - name: giftCardId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the gift card
  /google_geocoders/{googleGeocoderId}/markets:
    get:
      operationId: GET/googleGeocoderId/markets
      summary: Retrieve the markets associated to the google geocoder
      description: Retrieve the markets associated to the google geocoder
      tags:
      - markets
      parameters:
      - name: googleGeocoderId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the google geocoder
  /in_stock_subscriptions/{inStockSubscriptionId}/market:
    get:
      operationId: GET/inStockSubscriptionId/market
      summary: Retrieve the market associated to the in stock subscription
      description: Retrieve the market associated to the in stock subscription
      tags:
      - markets
      parameters:
      - name: inStockSubscriptionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the in stock subscription
  /manual_tax_calculators/{manualTaxCalculatorId}/markets:
    get:
      operationId: GET/manualTaxCalculatorId/markets
      summary: Retrieve the markets associated to the manual tax calculator
      description: Retrieve the markets associated to the manual tax calculator
      tags:
      - markets
      parameters:
      - name: manualTaxCalculatorId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the manual tax calculator
  /markets:
    get:
      operationId: GET/markets
      summary: List all markets
      description: List all markets
      tags:
      - markets
      responses:
        '200':
          description: A list of market objects
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/marketResponseList'
    post:
      operationId: POST/markets
      summary: Create a market
      description: Create a market
      tags:
      - markets
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/marketCreate'
      responses:
        '201':
          description: The created market object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/marketResponse'
  /markets/{marketId}:
    get:
      operationId: GET/markets/marketId
      summary: Retrieve a market
      description: Retrieve a market
      tags:
      - markets
      parameters:
      - name: marketId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/marketResponse'
    patch:
      operationId: PATCH/markets/marketId
      summary: Update a market
      description: Update a market
      tags:
      - markets
      parameters:
      - name: marketId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/marketUpdate'
      responses:
        '200':
          description: The updated market object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/marketResponse'
    delete:
      operationId: DELETE/markets/marketId
      summary: Delete a market
      description: Delete a market
      tags:
      - markets
      parameters:
      - name: marketId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '204':
          description: No content
  /order_subscriptions/{orderSubscriptionId}/market:
    get:
      operationId: GET/orderSubscriptionId/market
      summary: Retrieve the market associated to the order subscription
      description: Retrieve the market associated to the order subscription
      tags:
      - markets
      parameters:
      - name: orderSubscriptionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the order subscription
  /orders/{orderId}/market:
    get:
      operationId: GET/orderId/market
      summary: Retrieve the market associated to the order
      description: Retrieve the market associated to the order
      tags:
      - markets
      parameters:
      - name: orderId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the order
  /payment_methods/{paymentMethodId}/market:
    get:
      operationId: GET/paymentMethodId/market
      summary: Retrieve the market associated to the payment method
      description: Retrieve the market associated to the payment method
      tags:
      - markets
      parameters:
      - name: paymentMethodId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the payment method
  /percentage_discount_promotions/{percentageDiscountPromotionId}/market:
    get:
      operationId: GET/percentageDiscountPromotionId/market
      summary: Retrieve the market associated to the percentage discount promotion
      description: Retrieve the market associated to the percentage discount promotion
      tags:
      - markets
      parameters:
      - name: percentageDiscountPromotionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the percentage discount promotion
  /price_list_schedulers/{priceListSchedulerId}/market:
    get:
      operationId: GET/priceListSchedulerId/market
      summary: Retrieve the market associated to the price list scheduler
      description: Retrieve the market associated to the price list scheduler
      tags:
      - markets
      parameters:
      - name: priceListSchedulerId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the price list scheduler
  /prices/{priceId}/jwt_markets:
    get:
      operationId: GET/priceId/jwt_markets
      summary: Retrieve the jwt markets associated to the price
      description: Retrieve the jwt markets associated to the price
      tags:
      - markets
      parameters:
      - name: priceId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The jwt_markets associated to the price
  /promotions/{promotionId}/market:
    get:
      operationId: GET/promotionId/market
      summary: Retrieve the market associated to the promotion
      description: Retrieve the market associated to the promotion
      tags:
      - markets
      parameters:
      - name: promotionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the promotion
  /shipping_methods/{shippingMethodId}/market:
    get:
      operationId: GET/shippingMethodId/market
      summary: Retrieve the market associated to the shipping method
      description: Retrieve the market associated to the shipping method
      tags:
      - markets
      parameters:
      - name: shippingMethodId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the shipping method
  /sku_options/{skuOptionId}/market:
    get:
      operationId: GET/skuOptionId/market
      summary: Retrieve the market associated to the SKU option
      description: Retrieve the market associated to the SKU option
      tags:
      - markets
      parameters:
      - name: skuOptionId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the SKU option
  /skus/{skuId}/jwt_markets:
    get:
      operationId: GET/skuId/jwt_markets
      summary: Retrieve the jwt markets associated to the SKU
      description: Retrieve the jwt markets associated to the SKU
      tags:
      - markets
      parameters:
      - name: skuId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The jwt_markets associated to the SKU
  /stores/{storeId}/market:
    get:
      operationId: GET/storeId/market
      summary: Retrieve the market associated to the store
      description: Retrieve the market associated to the store
      tags:
      - markets
      parameters:
      - name: storeId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The market associated to the store
  /stripe_tax_accounts/{stripeTaxAccountId}/markets:
    get:
      operationId: GET/stripeTaxAccountId/markets
      summary: Retrieve the markets associated to the stripe tax account
      description: Retrieve the markets associated to the stripe tax account
      tags:
      - markets
      parameters:
      - name: stripeTaxAccountId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the stripe tax account
  /subscription_models/{subscriptionModelId}/markets:
    get:
      operationId: GET/subscriptionModelId/markets
      summary: Retrieve the markets associated to the subscription model
      description: Retrieve the markets associated to the subscription model
      tags:
      - markets
      parameters:
      - name: subscriptionModelId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the subscription model
  /talon_one_accounts/{talonOneAccountId}/markets:
    get:
      operationId: GET/talonOneAccountId/markets
      summary: Retrieve the markets associated to the talon one account
      description: Retrieve the markets associated to the talon one account
      tags:
      - markets
      parameters:
      - name: talonOneAccountId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the talon one account
  /tax_calculators/{taxCalculatorId}/markets:
    get:
      operationId: GET/taxCalculatorId/markets
      summary: Retrieve the markets associated to the tax calculator
      description: Retrieve the markets associated to the tax calculator
      tags:
      - markets
      parameters:
      - name: taxCalculatorId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the tax calculator
  /taxjar_accounts/{taxjarAccountId}/markets:
    get:
      operationId: GET/taxjarAccountId/markets
      summary: Retrieve the markets associated to the taxjar account
      description: Retrieve the markets associated to the taxjar account
      tags:
      - markets
      parameters:
      - name: taxjarAccountId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the taxjar account
  /vertex_accounts/{vertexAccountId}/markets:
    get:
      operationId: GET/vertexAccountId/markets
      summary: Retrieve the markets associated to the vertex account
      description: Retrieve the markets associated to the vertex account
      tags:
      - markets
      parameters:
      - name: vertexAccountId
        in: path
        schema:
          type: string
        required: true
        description: The resource's id
      responses:
        '200':
          description: The markets associated to the vertex account
components:
  schemas:
    marketResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              description: Unique identifier for the resource (hash).
              example: XAyRWNUzyN
            type:
              type: string
              description: The resource's type
              enum:
              - markets
            links:
              type: object
              properties:
                self:
                  type: string
                  description: URL
            attributes:
              $ref: '#/components/schemas/market/properties/data/properties/attributes'
            relationships:
              type: object
              properties:
                merchant:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - merchant
                        id:
                          type: string
                          description: The resource ID
                price_list:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - price_list
                        id:
                          type: string
                          description: The resource ID
                base_price_list:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - base_price_list
                        id:
                          type: string
                          description: The resource ID
                inventory_model:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - inventory_model
                        id:
                          type: string
                          description: The resource ID
                subscription_model:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - subscription_model
                        id:
                          type: string
                          description: The resource ID
                discount_engine:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - discount_engine
                        id:
                          type: string
                          description: The resource ID
                tax_calculator:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - tax_calculator
                        id:
                          type: string
                          description: The resource ID
                customer_group:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - customer_group
                        id:
                          type: string
                          description: The resource ID
                geocoder:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - geocoder
                        id:
                          type: string
                          description: The resource ID
                default_shipping_method:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - default_shipping_method
                        id:
                          type: string
                          description: The resource ID
                default_payment_method:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type
                          enum:
                          - default_payment_method
                        id:
                          type: string
                          description: The resource ID
                stores:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
 

# --- truncated at 32 KB (96 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/commerce-layer/refs/heads/main/openapi/commerce-layer-markets-api-openapi.yml