cURL
curl --request POST \ --url https://app.promptingco.com/api/v1/apps/{appId}/routes/import-preview \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data ' { "routes": [ { "path": "<string>", "targetId": "<string>", "targetType": "product_document" } ] } '
{ "ok": true, "data": { "appId": "<string>", "valid": true, "createCount": 1, "conflictCount": 1, "skipCount": 1, "routes": [ { "input": { "path": "<string>", "targetId": "<string>", "targetType": "product_document" }, "action": "create", "issues": [ "already_routed" ], "existingRoute": { "id": "<string>", "path": "<string>" }, "pathConflict": { "id": "<string>", "path": "<string>", "targetType": "<string>", "targetId": "<string>" }, "target": { "id": "<string>", "title": "<string>", "filePath": "<string>", "sourceUrl": "<string>", "status": "<string>", "type": "<string>", "redirectToUrl": "<string>", "productId": "<string>" }, "product": { "id": "<string>", "name": "<string>", "slug": "<string>" } } ] } }
Organization-scoped API key. Available scopes:
1
1 - 100
Show child attributes
Successful response
true