---
title: "Returns a market resource by ID"

doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/market/returns-a-market-resource-by-id'
  md: 'https://developer.shopline.com/docs/admin-rest-api/market/returns-a-market-resource-by-id.md'
---
# Returns a market resource by ID

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `read_markets`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /markets/:id.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Required Permissions

* `read_markets`

## Request

### Path Parameters

* `id`

  string (required)

  Market unique ID

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

* `market`

  object

  Market information

  * `market_id`

    string

    Market unique logo

  * `market_name`

    string

    Name of the market

  * `price_list`

    object

    The market’s price list

    * `parent`

      object

      Relative adjustments to other prices

      * `adjustment`

        object

        price adjustment

  * `primary`

    boolean

    Key markets or not

  * `regions`

    array<object>

    Region information

    * `code`

      string

      The ISO code identifying the region

    * `currency`

      object

      Currency information

      * `currency_code`

        string

        The currency's ISO code

  * `web_presence`

    object

    The market’s web presence

    * `default_locale`

      string

      The ISO code for the default locale

    * `root_urls`

      array<object>

      The list of root URLs

      * `locale`

        string

        The locale that the storefront loads in

      * `url`

        string

        Url

    * `subfolder_suffix`

      string

      The market-specific suffix of the subfolders

    * `alternate_locales`

      array<string>

      The ISO codes for the alternate locales

  * `currency_settings`

    object

    Market currency setting information

    * `base_currency`

      object

      Currency setting information

      * `currency_code`

        string

        Currency code

      * `currency_name`

        string

        Currency name

      * `exchange_rate`

        string

        The exchange rate is worth it when auto_exchange_rate= false ; manually fill in the exchange rate value ;

      * `rate_updated_at`

        string

        The date and time string that indicates ISO 8601 encoding . for example , the utc ( co-world time ) time zone indicates " 2019-09-07T15 : 50 : 00 z .2019 @ 3 : 00 pm . "Automatic exchange rate is the time for system update ;

      * `auto_exchange_rate`

        boolean

        True : automatic exchange rate ; false : manual exchange rate ;

    * `local_currencies`

      boolean

      Enable local currency or not

  * `enabled`

    boolean

    Market status available ; true : enable ; false : disable ;


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "externalDocs": {
    "description": "Permission point used by the interface is `read_markets` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "EamFoMdM",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "description": "Market unique ID",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "id",
        "description": "Market unique ID",
        "type": "string",
        "example": "2805657769119556579335"
      },
      "example": "2805657769119556579335"
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API. Please refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "market": {
                "name": "market",
                "description": "Market information",
                "type": "object",
                "properties": {
                  "market_id": {
                    "name": "market_id",
                    "description": "Market unique logo",
                    "type": "string",
                    "example": "2805657769119556579334"
                  },
                  "market_name": {
                    "name": "market_name",
                    "description": "Name of the market",
                    "type": "string",
                    "example": "US-MARKET"
                  },
                  "price_list": {
                    "name": "price_list",
                    "description": "The market’s price list",
                    "type": "object",
                    "properties": {
                      "parent": {
                        "name": "parent",
                        "description": "Relative adjustments to other prices",
                        "type": "object",
                        "properties": {
                          "adjustment": {
                            "name": "adjustment",
                            "description": "price adjustment",
                            "type": "object",
                            "properties": {
                              "type": {
                                "name": "type",
                                "description": "The type of price adjustment",
                                "type": "string",
                                "example": ""
                              },
                              "value": {
                                "name": "value",
                                "description": "The percentage of price adjustment",
                                "type": "float",
                                "example": 0
                              }
                            },
                            "example": {
                              "value": 0,
                              "type": ""
                            }
                          }
                        },
                        "example": {
                          "adjustment": {
                            "type": "",
                            "value": 0
                          }
                        }
                      }
                    },
                    "example": {
                      "parent": {
                        "adjustment": {
                          "value": 0,
                          "type": ""
                        }
                      }
                    }
                  },
                  "primary": {
                    "name": "primary",
                    "description": "Key markets or not",
                    "type": "boolean",
                    "example": true
                  },
                  "regions": {
                    "name": "regions",
                    "description": "Region information",
                    "type": "array",
                    "items": {
                      "name": "regions",
                      "description": "Region information",
                      "type": "object",
                      "properties": {
                        "code": {
                          "name": "code",
                          "description": "The ISO code identifying the region",
                          "type": "string",
                          "example": ""
                        },
                        "currency": {
                          "name": "currency",
                          "description": "Currency information",
                          "type": "object",
                          "properties": {
                            "currency_code": {
                              "name": "currency_code",
                              "description": "The currency's ISO code",
                              "type": "string",
                              "example": ""
                            }
                          },
                          "example": {
                            "currency_code": ""
                          }
                        }
                      },
                      "example": {
                        "currency": {
                          "currency_code": ""
                        },
                        "code": ""
                      }
                    },
                    "example": [
                      {
                        "code": "",
                        "currency": {
                          "currency_code": ""
                        }
                      }
                    ]
                  },
                  "web_presence": {
                    "name": "web_presence",
                    "description": "The market’s web presence",
                    "type": "object",
                    "properties": {
                      "default_locale": {
                        "name": "default_locale",
                        "description": "The ISO code for the default locale",
                        "type": "string",
                        "example": ""
                      },
                      "root_urls": {
                        "name": "root_urls",
                        "description": "The list of root URLs",
                        "type": "array",
                        "items": {
                          "name": "root_urls",
                          "description": "The list of root URLs",
                          "type": "object",
                          "properties": {
                            "locale": {
                              "name": "locale",
                              "description": "The locale that the storefront loads in",
                              "type": "string",
                              "example": ""
                            },
                            "url": {
                              "name": "url",
                              "description": "Url",
                              "type": "string",
                              "example": ""
                            }
                          },
                          "example": {
                            "locale": "",
                            "url": ""
                          }
                        },
                        "example": [
                          {
                            "locale": "",
                            "url": ""
                          }
                        ]
                      },
                      "subfolder_suffix": {
                        "name": "subfolder_suffix",
                        "description": "The market-specific suffix of the subfolders",
                        "type": "string",
                        "example": ""
                      },
                      "alternate_locales": {
                        "name": "alternate_locales",
                        "description": "The ISO codes for the alternate locales",
                        "type": "array",
                        "items": {
                          "name": "alternate_locales",
                          "description": "The ISO codes for the alternate locales",
                          "type": "string",
                          "example": ""
                        },
                        "example": [
                          ""
                        ]
                      }
                    },
                    "example": {
                      "root_urls": [
                        {
                          "locale": "",
                          "url": ""
                        }
                      ],
                      "subfolder_suffix": "",
                      "alternate_locales": [
                        ""
                      ],
                      "default_locale": ""
                    }
                  },
                  "currency_settings": {
                    "name": "currency_settings",
                    "description": "Market currency setting information",
                    "type": "object",
                    "properties": {
                      "base_currency": {
                        "name": "base_currency",
                        "description": "Currency setting information",
                        "type": "object",
                        "properties": {
                          "currency_code": {
                            "name": "currency_code",
                            "description": "Currency code",
                            "type": "string",
                            "example": "USD"
                          },
                          "currency_name": {
                            "name": "currency_name",
                            "description": "Currency name",
                            "type": "string",
                            "example": "USD"
                          },
                          "exchange_rate": {
                            "name": "exchange_rate",
                            "description": "The exchange rate is worth it when auto_exchange_rate= false ; manually fill in the exchange rate value ;",
                            "type": "string",
                            "example": "1.01234567891"
                          },
                          "rate_updated_at": {
                            "name": "rate_updated_at",
                            "description": "The date and time string that indicates ISO 8601 encoding . for example , the utc ( co-world time ) time zone indicates \" 2019-09-07T15 : 50 : 00 z .2019 @ 3 : 00 pm . \"Automatic exchange rate is the time for system update ;",
                            "type": "string",
                            "example": "2019-09-07T15:50:00Z"
                          },
                          "auto_exchange_rate": {
                            "name": "auto_exchange_rate",
                            "description": "True : automatic exchange rate ; false : manual exchange rate ;",
                            "type": "boolean",
                            "example": true
                          }
                        },
                        "example": {
                          "currency_code": "USD",
                          "currency_name": "USD",
                          "exchange_rate": "1.01234567891",
                          "rate_updated_at": "2019-09-07T15:50:00Z",
                          "auto_exchange_rate": true
                        }
                      },
                      "local_currencies": {
                        "name": "local_currencies",
                        "description": "Enable local currency or not",
                        "type": "boolean",
                        "example": true
                      }
                    },
                    "example": {
                      "base_currency": {
                        "currency_code": "USD",
                        "currency_name": "USD",
                        "exchange_rate": "1.01234567891",
                        "rate_updated_at": "2019-09-07T15:50:00Z",
                        "auto_exchange_rate": true
                      },
                      "local_currencies": true
                    }
                  },
                  "enabled": {
                    "name": "enabled",
                    "description": "Market status available ; true : enable ; false : disable ;",
                    "type": "boolean",
                    "example": true
                  }
                },
                "example": {
                  "market_name": "US-MARKET",
                  "price_list": {
                    "parent": {
                      "adjustment": {
                        "type": "",
                        "value": 0
                      }
                    }
                  },
                  "primary": true,
                  "regions": [
                    {
                      "code": "",
                      "currency": {
                        "currency_code": ""
                      }
                    }
                  ],
                  "web_presence": {
                    "alternate_locales": [
                      ""
                    ],
                    "default_locale": "",
                    "root_urls": [
                      {
                        "locale": "",
                        "url": ""
                      }
                    ],
                    "subfolder_suffix": ""
                  },
                  "currency_settings": {
                    "base_currency": {
                      "auto_exchange_rate": true,
                      "currency_code": "USD",
                      "currency_name": "USD",
                      "exchange_rate": "1.01234567891",
                      "rate_updated_at": "2019-09-07T15:50:00Z"
                    },
                    "local_currencies": true
                  },
                  "enabled": true,
                  "market_id": "2805657769119556579334"
                }
              }
            },
            "example": {
              "market": {
                "regions": [
                  {
                    "code": "",
                    "currency": {
                      "currency_code": ""
                    }
                  }
                ],
                "web_presence": {
                  "root_urls": [
                    {
                      "url": "",
                      "locale": ""
                    }
                  ],
                  "subfolder_suffix": "",
                  "alternate_locales": [
                    ""
                  ],
                  "default_locale": ""
                },
                "currency_settings": {
                  "base_currency": {
                    "rate_updated_at": "2019-09-07T15:50:00Z",
                    "auto_exchange_rate": true,
                    "currency_code": "USD",
                    "currency_name": "USD",
                    "exchange_rate": "1.01234567891"
                  },
                  "local_currencies": true
                },
                "enabled": true,
                "market_id": "2805657769119556579334",
                "market_name": "US-MARKET",
                "price_list": {
                  "parent": {
                    "adjustment": {
                      "value": 0,
                      "type": ""
                    }
                  }
                },
                "primary": true
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/markets/:id.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Returns a market resource by ID",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_markets"
  ]
}
```