Skip to content

MOGU Public API (1.0.0)

Public API for managing trips and catalogs in the MOGU platform

Download OpenAPI description
Languages
Servers
Mock server
https://api-docs.moguplatform.com/_mock/openapi
Production server
https://trips.api.moguplatform.com

ai

AI-powered trip generation from documents and text

Operations

Create trip from document

Request

Create a new trip from a document using AI. Supports URLs to documents (PDF, TXT, images) or plain text descriptions.

The job runs asynchronously. Use the returned status URL to poll for completion.

Supported source types:

  • url: URL to a document (PDF, TXT, JPG, PNG)
  • text: Plain text description or JSON object (will be stringified)
  • inline: Base64-encoded document with filename
Security
bearerAuth
Bodyapplication/jsonrequired
sourceanyrequired
source.​typestringrequired
Value"url"
Example: "url"
Discriminator
source.​urlstring(uri)required

URL of the document (PDF, TXT, or image)

Example: "https://storage.example.com/itinerary.pdf"
isTemplateboolean

Create the trip as a template

Default false
Example: false
curl -i -X POST \
  https://api-docs.moguplatform.com/_mock/openapi/ai/trips/from-document \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "source": {
      "type": "url",
      "url": "https://storage.example.com/itinerary.pdf"
    },
    "isTemplate": false
  }'

Responses

Job created and processing started

Bodyapplication/json
jobIdstring(uuid)required

Unique public identifier for the job

Example: "1c2c38f3-e596-463e-9f62-75c7c3602770"
statusstringrequired
Value"processing"
Example: "processing"
linksobjectrequired
links.​publicUrlstring(uri)required

URL to the trip public page

Example: "https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770"
links.​builderUrlstring(uri)required

URL to the trip builder (requires authentication)

Example: "https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770"
links.​statusstring(uri)required

API endpoint to check job status

Example: "https://trips.api.moguplatform.com/ai/trips/1c2c38f3-e596-463e-9f62-75c7c3602770/status"
links.​cancelstring(uri)required

API endpoint to cancel the job

Example: "https://trips.api.moguplatform.com/ai/trips/1c2c38f3-e596-463e-9f62-75c7c3602770/actions/cancel"
Response
application/json
{ "jobId": "1c2c38f3-e596-463e-9f62-75c7c3602770", "status": "processing", "links": { "publicUrl": "https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770", "builderUrl": "https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770", "status": "https://trips.api.moguplatform.com/ai/trips/1c2c38f3-e596-463e-9f62-75c7c3602770/status", "cancel": "https://trips.api.moguplatform.com/ai/trips/1c2c38f3-e596-463e-9f62-75c7c3602770/actions/cancel" } }

Get job status

Request

Get the current status of a trip creation job. This endpoint is public and does not require authentication.

Status values:

  • processing: Job is still running
  • completed: Trip has been created successfully
  • error: Job failed with an error
  • canceled: Job was canceled

Stage values (during processing):

  • initializing: Starting the job
  • extractingText: Extracting text from the document
  • generatingBlocks: Generating trip structure with AI
  • enrichingBlocks: Enriching blocks with real-world data (flights, places, images)
  • completed: Processing finished

When status is completed, the publicUrl and builderUrl will point to the actual trip pages.

Path
publicIdstring(uuid)required

Public UUID of the job

Example: 1c2c38f3-e596-463e-9f62-75c7c3602770
curl -i -X GET \
  https://api-docs.moguplatform.com/_mock/openapi/ai/trips/1c2c38f3-e596-463e-9f62-75c7c3602770/status

Responses

Job status retrieved successfully

Bodyapplication/json
jobIdstring(uuid)required

Unique public identifier for the job

Example: "1c2c38f3-e596-463e-9f62-75c7c3602770"
statusstringrequired

Current status of the job

Enum"processing""completed""error""canceled"
Example: "processing"
stagestringrequired

Current processing stage

Enum"initializing""extractingText""generatingBlocks""enrichingBlocks""completed"
Example: "enrichingBlocks"
publicUrlstring(uri)required

URL to the trip public page

Example: "https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770"
builderUrlstring(uri)required

URL to the trip builder (requires authentication)

Example: "https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770"
tripIdinteger or nullrequired

Trip ID if completed, null otherwise

Example: null
tripSlugstring or nullrequired

Trip slug if completed, null otherwise

Example: null
errorstring

Error message if status is error

Example: "Could not extract trip information from document"
updatedAtstring(date-time)required

Last update timestamp (ISO 8601)

Example: "2026-01-27T15:30:28Z"
Response
application/json
{ "jobId": "1c2c38f3-e596-463e-9f62-75c7c3602770", "status": "processing", "stage": "enrichingBlocks", "publicUrl": "https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770", "builderUrl": "https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770", "tripId": null, "tripSlug": null, "updatedAt": "2026-01-27T15:30:28Z" }

Cancel job

Request

Cancel a job that is still in progress. Only the agent who created the job can cancel it.

Jobs can only be canceled while in processing status. Completed, errored, or already canceled jobs cannot be canceled.

Security
bearerAuth
Path
publicIdstring(uuid)required

Public UUID of the job

Example: 1c2c38f3-e596-463e-9f62-75c7c3602770
curl -i -X POST \
  https://api-docs.moguplatform.com/_mock/openapi/ai/trips/1c2c38f3-e596-463e-9f62-75c7c3602770/actions/cancel \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Job canceled successfully

Bodyapplication/json
jobIdstring(uuid)required

Unique public identifier for the job

Example: "1c2c38f3-e596-463e-9f62-75c7c3602770"
statusstringrequired

Current status of the job

Enum"processing""completed""error""canceled"
Example: "processing"
stagestringrequired

Current processing stage

Enum"initializing""extractingText""generatingBlocks""enrichingBlocks""completed"
Example: "enrichingBlocks"
publicUrlstring(uri)required

URL to the trip public page

Example: "https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770"
builderUrlstring(uri)required

URL to the trip builder (requires authentication)

Example: "https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770"
tripIdinteger or nullrequired

Trip ID if completed, null otherwise

Example: null
tripSlugstring or nullrequired

Trip slug if completed, null otherwise

Example: null
errorstring

Error message if status is error

Example: "Could not extract trip information from document"
updatedAtstring(date-time)required

Last update timestamp (ISO 8601)

Example: "2026-01-27T15:30:28Z"
Response
application/json
{ "jobId": "1c2c38f3-e596-463e-9f62-75c7c3602770", "status": "canceled", "stage": "extractingText", "publicUrl": "https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770", "builderUrl": "https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770", "tripId": null, "tripSlug": null, "updatedAt": "2026-01-27T15:30:20Z" }

trips

Operations for managing trips

Operations

catalogs

Operations for managing catalogs

Operations

status

API health check

Operations