---
title: "Get product publication status in markets"
description: >
  Get the publication status of the product in the markets corresponding to specific countries or regions.
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/market/query-the-market-published-of-the-product'
  md: 'https://developer.shopline.com/docs/admin-rest-api/market/query-the-market-published-of-the-product.md'
---
# Get product publication status in markets

Get the publication status of the product in the markets corresponding to specific countries or regions.

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

## Endpoint

```http
GET /markets/:product_id/published.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_products`

## Request

### Path Parameters

* `product_id`

  string (required)

  The unique identifier for the product. <br/>
  Maximum length：64 

### Query Parameters

* `country_codes`

  string (required)

  A list of two-letter country or region codes that follow the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) standard, used to identify a specific market's country or region, with multiple codes separated by commas. Supports a maximum of 10 codes. 

### 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

* `markets`

  array<object>

  A list of product publication statuses in markets.

  * `country_code`

    string

    A two-letter code following the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) standard, used to identify the country or region of the market.

  * `published`

    boolean

    Whether the product is published in the market of the corresponding country or region.
    - ` true`: Published
    - ` false`: Unpublished


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "tags": [
    "Get product publication status in markets"
  ],
  "description": "Get the publication status of the product in the markets corresponding to specific countries or regions.",
  "externalDocs": {
    "description": "Permission point used by the interface is `read_products` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "5ybIPYfh",
  "parameters": [
    {
      "name": "product_id",
      "in": "path",
      "description": "The unique identifier for the product. <br/>\nMaximum length：64 ",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "product_id",
        "description": "The unique identifier for the product. <br/>\nMaximum length：64 ",
        "type": "string",
        "example": "16049619743346320200470282"
      },
      "example": "16049619743346320200470282",
      "examples": {
        "Get product publication status in markets": {
          "value": "16060895302856191591063144"
        }
      }
    },
    {
      "name": "country_codes",
      "in": "query",
      "description": "A list of two-letter country or region codes that follow the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) standard, used to identify a specific market's country or region, with multiple codes separated by commas. Supports a maximum of 10 codes. ",
      "required": true,
      "style": "form",
      "explode": true,
      "schema": {
        "name": "country_codes",
        "description": "A list of two-letter country or region codes that follow the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) standard, used to identify a specific market's country or region, with multiple codes separated by commas. Supports a maximum of 10 codes. ",
        "type": "string",
        "example": "CN,US"
      },
      "example": "CN,US",
      "examples": {
        "Get product publication status in markets": {
          "value": "CN,US"
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "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 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. ",
        "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": {
            "name": "body",
            "type": "object",
            "properties": {
              "markets": {
                "name": "markets",
                "description": "A list of product publication statuses in markets.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "country_code": {
                      "name": "country_code",
                      "description": "A two-letter code following the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) standard, used to identify the country or region of the market.",
                      "type": "string",
                      "example": "US"
                    },
                    "published": {
                      "name": "published",
                      "description": "Whether the product is published in the market of the corresponding country or region.\n- ` true`: Published\n- ` false`: Unpublished",
                      "type": "boolean"
                    }
                  },
                  "example": {
                    "country_code": "US",
                    "published": null
                  }
                },
                "example": [
                  {
                    "published": null,
                    "country_code": "US"
                  }
                ]
              }
            },
            "example": {
              "markets": [
                {
                  "country_code": "US",
                  "published": null
                }
              ]
            }
          },
          "examples": {
            "Get product publication status in markets": {
              "description": "Get product publication status in markets.",
              "value": {
                "markets": [
                  {
                    "country_code": "CN",
                    "published": true
                  },
                  {
                    "country_code": "US",
                    "published": 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/:product_id/published.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": "Get product publication status in markets",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_products"
  ]
}
```