# The market object

A market object is returned as part of the response body of each successful list, retrieve, create or update API call to the `/api/markets` endpoint.

## Fields

| Field                                           | Type      | Description                                                                                                                                                                                                                                     |
| ----------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**                                        | `string`  | `markets`                                                                                                                                                                                                                                       |
| **id**                                          | `string`  | The market unique identifier                                                                                                                                                                                                                    |
| links.**self**                                  | `string`  | The market endpoint URL                                                                                                                                                                                                                         |
| attributes.**number**                           | `integer` | Unique identifier for the market (numeric).                                                                                                                                                                                                     |
| attributes.**name**                             | `string`  | The market's internal name.                                                                                                                                                                                                                     |
| attributes.**code**                             | `string`  | A string that you can use to identify the market (must be unique within the environment).                                                                                                                                                       |
| attributes.**facebook\_pixel\_id**              | `string`  | The Facebook Pixed ID.                                                                                                                                                                                                                          |
| attributes.**checkout\_url**                    | `string`  | The checkout URL for this market.                                                                                                                                                                                                               |
| attributes.**external\_prices\_url**            | `string`  | The URL used to overwrite prices by an external source.                                                                                                                                                                                         |
| attributes.**external\_order\_validation\_url** | `string`  | The URL used to validate orders by an external source.                                                                                                                                                                                          |
| attributes.**private**                          | `boolean` | Indicates if market belongs to a customer\_group.                                                                                                                                                                                               |
| attributes.**shipping\_cost\_cutoff**           | `integer` | When specified indicates the maximum number of shipping line items with cost that will be added to an order.                                                                                                                                    |
| attributes.**\_disable**                        | `boolean` | Send this attribute if you want to mark this resource as disabled.                                                                                                                                                                              |
| attributes.**\_enable**                         | `boolean` | Send this attribute if you want to mark this resource as enabled.                                                                                                                                                                               |
| attributes.**disabled\_at**                     | `string`  | Time at which this resource was disabled.                                                                                                                                                                                                       |
| attributes.**shared\_secret**                   | `string`  | The shared secret used to sign the external request payload.                                                                                                                                                                                    |
| attributes.**external\_includes**               | `array`   | List of related resources that will be included in the request to the external callback. Please do consult the documentation to check on which resource the includes are related (i.e. the order) and the defaults in case no list is provided. |
| attributes.**created\_at**                      | `string`  | Time at which the resource was created.                                                                                                                                                                                                         |
| attributes.**updated\_at**                      | `string`  | Time at which the resource was last updated.                                                                                                                                                                                                    |
| attributes.**reference**                        | `string`  | A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.                                             |
| attributes.**reference\_origin**                | `string`  | Any identifier of the third party system that defines the reference code.                                                                                                                                                                       |
| attributes.**metadata**                         | `object`  | Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.                                                                                    |
| relationships.**merchant**                      | `object`  | The associated merchant.                                                                                                                                                                                                                        |
| relationships.**price\_list**                   | `object`  | The active price list. Can be the one associated to the active scheduler or the base one if there are no schedulers.                                                                                                                            |
| relationships.**base\_price\_list**             | `object`  | The base price list associated to the market, no matter the active price scheduler.                                                                                                                                                             |
| relationships.**inventory\_model**              | `object`  | The associated inventory model.                                                                                                                                                                                                                 |
| relationships.**subscription\_model**           | `object`  | The associated subscription model.                                                                                                                                                                                                              |
| relationships.**discount\_engine**              | `object`  | The associated discount engine.                                                                                                                                                                                                                 |
| relationships.**tax\_calculator**               | `object`  | The associated tax calculator.                                                                                                                                                                                                                  |
| relationships.**customer\_group**               | `object`  | The associated customer group.                                                                                                                                                                                                                  |
| relationships.**geocoder**                      | `object`  | The associated geocoder.                                                                                                                                                                                                                        |
| relationships.**default\_shipping\_method**     | `object`  | The default shipping method for shipments.                                                                                                                                                                                                      |
| relationships.**default\_payment\_method**      | `object`  | The default payment method for orders.                                                                                                                                                                                                          |
| relationships.**stores**                        | `array`   | The associated stores.                                                                                                                                                                                                                          |
| relationships.**price\_list\_schedulers**       | `array`   | The associated price list schedulers.                                                                                                                                                                                                           |
| relationships.**attachments**                   | `array`   | The associated attachments.                                                                                                                                                                                                                     |
| relationships.**event\_stores**                 | `array`   | The associated event stores.                                                                                                                                                                                                                    |
| meta.**mode**                                   | `string`  | The resource environment (can be one of `test` or `live`)                                                                                                                                                                                       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.commercelayer.io/core-api-reference/markets/object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
