# Data Migrations

## GET /v1/stores/{storeId}/data-migrations

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"data-migrations"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DataMigrationTaskDto":{"required":["id","platform","started_at","started_by","store_id","token","total_entities_migrated"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"platform":{"type":"string","description":"Platform from which data is being migrated (e.g., \"tebex\")."},"token":{"type":"string","description":"Masked authentication token used for accessing the source platform API."},"error":{"type":["null","string"],"description":"Error message if the migration encountered any errors, otherwise null."},"started_at":{"type":"string","description":"Timestamp when the migration was initiated.","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Timestamp when the migration failed, or null if it didn't fail.","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Timestamp when the migration was successfully completed, or null if not completed.","format":"date-time"},"total_entities_to_migrate":{"type":["null","integer"],"description":"Total number of entities that need to be migrated, or null if unknown.","format":"int64"},"total_entities_migrated":{"type":"integer","description":"Number of entities that have been successfully migrated.","format":"int32"},"started_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/data-migrations":{"get":{"tags":["data-migrations"],"operationId":"DataMigrations_GetDataMigrations","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataMigrationTaskDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/data-migrations/tebex

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"data-migrations"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StartDataMigrationFromTebexRequestDto":{"required":["headless_token","plugin_token"],"type":"object","properties":{"headless_token":{"type":"string","description":"The public-facing Headless API token."},"plugin_token":{"type":"string","description":"An API token associated to a Tebex game server."}},"additionalProperties":false},"DataMigrationTaskDto":{"required":["id","platform","started_at","started_by","store_id","token","total_entities_migrated"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"platform":{"type":"string","description":"Platform from which data is being migrated (e.g., \"tebex\")."},"token":{"type":"string","description":"Masked authentication token used for accessing the source platform API."},"error":{"type":["null","string"],"description":"Error message if the migration encountered any errors, otherwise null."},"started_at":{"type":"string","description":"Timestamp when the migration was initiated.","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Timestamp when the migration failed, or null if it didn't fail.","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Timestamp when the migration was successfully completed, or null if not completed.","format":"date-time"},"total_entities_to_migrate":{"type":["null","integer"],"description":"Total number of entities that need to be migrated, or null if unknown.","format":"int64"},"total_entities_migrated":{"type":"integer","description":"Number of entities that have been successfully migrated.","format":"int32"},"started_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/data-migrations/tebex":{"post":{"tags":["data-migrations"],"operationId":"DataMigrations_StartDataMigrationFromTebex","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDataMigrationFromTebexRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/StartDataMigrationFromTebexRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/StartDataMigrationFromTebexRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataMigrationTaskDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


---

# 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.paynow.gg/management/management-api/data-migrations.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.
