> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/deprecated/directory-markets.md).

# Directory Markets

Operations related to Directory Markets that define geographical or business markets within the platform directory.

## GET /markets

> Search markets

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory Markets","description":"Operations related to Directory Markets that define geographical or business markets within the platform directory."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/markets":{"get":{"parameters":[{"style":"form","description":"Offset from which the search must be performed","in":"query","required":false,"name":"first_result","schema":{"type":"integer","format":"int32"},"explode":true},{"explode":true,"description":"Number of maximum items that shall be return by this search","in":"query","schema":{"type":"integer","format":"int32"},"style":"form","name":"max_results","required":false}],"deprecated":true,"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MarketResource"}},"count":{"type":"integer"},"total":{"type":"integer"},"first_result":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"max_results":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Directory Markets"],"description":"","operationId":"findMarkets","summary":"Search markets"}}},"components":{"schemas":{"MarketResource":{"type":"object","properties":{"id":{"type":"string","readOnly":false},"country_iso":{"type":"string","readOnly":false},"offer":{"type":"string","readOnly":false}},"required":["country_iso","id","offer"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /markets

> Create market

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory Markets","description":"Operations related to Directory Markets that define geographical or business markets within the platform directory."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/markets":{"post":{"requestBody":{"description":"The market to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketResource"}}},"required":true},"operationId":"createMarket","description":"","deprecated":true,"tags":["Directory Markets"],"summary":"Create market","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/MarketResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"MarketResource":{"type":"object","properties":{"id":{"type":"string","readOnly":false},"country_iso":{"type":"string","readOnly":false},"offer":{"type":"string","readOnly":false}},"required":["country_iso","id","offer"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /markets/{id}

> Get market by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory Markets","description":"Operations related to Directory Markets that define geographical or business markets within the platform directory."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/markets/{id}":{"get":{"operationId":"getMarket","tags":["Directory Markets"],"summary":"Get market by id","parameters":[{"explode":false,"required":true,"schema":{"type":"integer","format":"int64"},"name":"id","in":"path","style":"simple"}],"deprecated":true,"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/MarketResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"MarketResource":{"type":"object","properties":{"id":{"type":"string","readOnly":false},"country_iso":{"type":"string","readOnly":false},"offer":{"type":"string","readOnly":false}},"required":["country_iso","id","offer"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /markets/{id}

> Update market

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory Markets","description":"Operations related to Directory Markets that define geographical or business markets within the platform directory."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/markets/{id}":{"put":{"deprecated":true,"parameters":[{"name":"id","schema":{"type":"integer","format":"int64"},"explode":false,"in":"path","style":"simple","required":true}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/MarketResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","summary":"Update market","operationId":"updateMarket","tags":["Directory Markets"],"requestBody":{"description":"The market to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketResource"}}},"required":true}}}},"components":{"schemas":{"MarketResource":{"type":"object","properties":{"id":{"type":"string","readOnly":false},"country_iso":{"type":"string","readOnly":false},"offer":{"type":"string","readOnly":false}},"required":["country_iso","id","offer"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /markets/{id}

> Delete market

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory Markets","description":"Operations related to Directory Markets that define geographical or business markets within the platform directory."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/markets/{id}":{"delete":{"summary":"Delete market","responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"deleteMarket","deprecated":true,"parameters":[{"in":"path","name":"id","explode":false,"schema":{"type":"integer","format":"int64"},"required":true,"style":"simple"}],"tags":["Directory Markets"],"description":""}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/deprecated/directory-markets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
