{"items":[{"type":"link","label":"MOGU Public API","link":"/openapi","routeSlug":"/openapi","content":{"contentType":"overview","meta":{"name":"MOGU Public API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"openapi.json","url":"/_bundle/openapi.json?download"},{"kind":"download","label":"openapi.yaml","url":"/_bundle/openapi.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"URL","titleTranslationKey":"info.contact.url","label":"https://moguplatform.com","url":"https://moguplatform.com"},{"kind":"email","title":"MOGU Support","email":"support@moguplatform.com","label":"support@moguplatform.com","withCopyButton":true,"copyContent":"support@moguplatform.com"},{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"Proprietary","url":"https://moguplatform.com/terms"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"MOGU Public API (1.1.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":"Public API for managing trips and catalogs in the MOGU platform"}],"sectionId":"/"}],"sectionId":"/"}]}]}},{"type":"group","label":"ai","link":"/openapi/ai","routeSlug":"/openapi/ai","items":[{"label":"Create trip from document","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/ai/createtripfromdocument","routeSlug":"/openapi/ai/createtripfromdocument","metadata":{"seo":{"title":"Create trip from document","description":"Create a new trip from a document using AI. Supports URLs to documents (PDF, TXT, images)or plain text descriptions."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createTripFromDocument","name":"Create trip from document","isWebhook":false,"pointer":"/paths/~1trip-imports/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create trip from document","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Create a new trip from a document using AI. Supports URLs to documents (PDF, TXT, images)"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"or plain text descriptions."},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The job runs asynchronously. Use the returned status URL to poll for completion."},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Supported source types:"},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": URL to a document (PDF, TXT, JPG, PNG)"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"text"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Plain text description or JSON object (will be stringified)"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"inline"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Base64-encoded document with filename"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trip-imports/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/AICreateFromDocumentRequest","exampleIds":["paths/~1trip-imports/post/requestBody/content/application~1json/examples/url","paths/~1trip-imports/post/requestBody/content/application~1json/examples/text","paths/~1trip-imports/post/requestBody/content/application~1json/examples/json","paths/~1trip-imports/post/requestBody/content/application~1json/examples/inline"]}},"schemaId":"components/schemas/AICreateFromDocumentRequest","exampleIds":["paths/~1trip-imports/post/requestBody/content/application~1json/examples/url","paths/~1trip-imports/post/requestBody/content/application~1json/examples/text","paths/~1trip-imports/post/requestBody/content/application~1json/examples/json","paths/~1trip-imports/post/requestBody/content/application~1json/examples/inline"],"pointer":"/paths/~1trip-imports/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/trip-imports","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/AICreateFromDocumentRequest","exampleIds":["paths/~1trip-imports/post/requestBody/content/application~1json/examples/url","paths/~1trip-imports/post/requestBody/content/application~1json/examples/text","paths/~1trip-imports/post/requestBody/content/application~1json/examples/json","paths/~1trip-imports/post/requestBody/content/application~1json/examples/inline"]}},"responseCodes":["202","400","401","403"],"pointer":"/trip-imports","href":"ai/createtripfromdocument","openApiOperationId":"createTripFromDocument","summary":"Create trip from document","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"components/schemas/AICreateFromDocumentRequest","exampleIds":["paths/~1trip-imports/post/requestBody/content/application~1json/examples/url","paths/~1trip-imports/post/requestBody/content/application~1json/examples/text","paths/~1trip-imports/post/requestBody/content/application~1json/examples/json","paths/~1trip-imports/post/requestBody/content/application~1json/examples/inline"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/AICreateFromDocumentRequest","exampleIds":["paths/~1trip-imports/post/requestBody/content/application~1json/examples/url","paths/~1trip-imports/post/requestBody/content/application~1json/examples/text","paths/~1trip-imports/post/requestBody/content/application~1json/examples/json","paths/~1trip-imports/post/requestBody/content/application~1json/examples/inline"]}},"examples":[{},{},{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"202","description":"Job created and processing started","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AICreateFromDocumentResponse","exampleIds":["paths/~1trip-imports/post/responses/202/content/application~1json/example"]}},"schemaId":"components/schemas/AICreateFromDocumentResponse","exampleIds":["paths/~1trip-imports/post/responses/202/content/application~1json/example"]},{"code":"400","description":"Invalid request","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_source","paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_url","paths/~1trip-imports/post/responses/400/content/application~1json/examples/unsupported_format"]}},"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_source","paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_url","paths/~1trip-imports/post/responses/400/content/application~1json/examples/unsupported_format"]},{"code":"401","description":"Authentication failed","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/401/content/application~1json/example"]}},"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/401/content/application~1json/example"]},{"code":"403","description":"Insufficient AI credits","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/403/content/application~1json/example"]}},"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/403/content/application~1json/example"]}],"pointer":"/paths/~1trip-imports/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"202","schemaId":"components/schemas/AICreateFromDocumentResponse","exampleIds":["paths/~1trip-imports/post/responses/202/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AICreateFromDocumentResponse","exampleIds":["paths/~1trip-imports/post/responses/202/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_source","paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_url","paths/~1trip-imports/post/responses/400/content/application~1json/examples/unsupported_format"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_source","paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_url","paths/~1trip-imports/post/responses/400/content/application~1json/examples/unsupported_format"]}}},{"code":"401","schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/401/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/401/content/application~1json/example"]}}},{"code":"403","schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/403/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports/post/responses/403/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/ai/createtripfromdocument"}],"panels":[]}]},"httpPath":"/trip-imports"},{"label":"Get job status","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/ai/getjobstatus","routeSlug":"/openapi/ai/getjobstatus","metadata":{"seo":{"title":"Get job status","description":"Get the current status of a trip creation job. This endpoint is public and does not require authentication."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getJobStatus","name":"Get job status","isWebhook":false,"pointer":"/paths/~1trip-imports~1{publicId}~1status/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get job status","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Get the current status of a trip creation job. This endpoint is public and does not require authentication."},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Status values:"},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"processing"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Job is still running"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"completed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Trip has been created successfully"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Job failed with an error"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"canceled"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Job was canceled"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Stage values (during processing):"},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"initializing"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Starting the job"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"extractingText"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Extracting text from the document"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"generatingBlocks"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Generating trip structure with AI"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"enrichingBlocks"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Enriching blocks with real-world data (flights, places, images)"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"completed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": Processing finished"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"When status is "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"completed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"publicUrl"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"builderUrl"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" will point to the actual trip pages."},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"publicId","in":"path","schemaId":"schema_1","description":"Public UUID of the job","required":true}],"pointer":"/paths/~1trip-imports~1{publicId}~1status/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/trip-imports/{publicId}/status","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"publicId","in":"path","required":true,"example":"1c2c38f3-e596-463e-9f62-75c7c3602770","schemaId":"schema_1"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"responseCodes":["200","404"],"pointer":"/trip-imports/{publicId}/status","href":"ai/getjobstatus","openApiOperationId":"getJobStatus","summary":"Get job status"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Job status retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIJobStatusResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/processing","paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/completed","paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/error"]}},"schemaId":"components/schemas/AIJobStatusResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/processing","paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/completed","paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/error"]},{"code":"404","description":"Job not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1status/get/responses/404/content/application~1json/example"]}},"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1status/get/responses/404/content/application~1json/example"]}],"pointer":"/paths/~1trip-imports~1{publicId}~1status/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/AIJobStatusResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/processing","paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/completed","paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/error"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIJobStatusResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/processing","paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/completed","paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/error"]}}},{"code":"404","schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1status/get/responses/404/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1status/get/responses/404/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/ai/getjobstatus"}],"panels":[]}]},"httpPath":"/trip-imports/{publicId}/status"},{"label":"Cancel job","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/ai/canceljob","routeSlug":"/openapi/ai/canceljob","metadata":{"seo":{"title":"Cancel job","description":"Cancel a job that is still in progress. Only the agent who created the job can cancel it."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"cancelJob","name":"Cancel job","isWebhook":false,"pointer":"/paths/~1trip-imports~1{publicId}~1actions~1cancel/post","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Cancel job","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Cancel a job that is still in progress. Only the agent who created the job can cancel it."},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Jobs can only be canceled while in "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"processing"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" status."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Completed, errored, or already canceled jobs cannot be canceled."},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"publicId","in":"path","schemaId":"schema_1","description":"Public UUID of the job","required":true}],"pointer":"/paths/~1trip-imports~1{publicId}~1actions~1cancel/post/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trip-imports~1{publicId}~1actions~1cancel/post/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/trip-imports/{publicId}/actions/cancel","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"publicId","in":"path","required":true,"example":"1c2c38f3-e596-463e-9f62-75c7c3602770","schemaId":"schema_1"}],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401","404"],"pointer":"/trip-imports/{publicId}/actions/cancel","href":"ai/canceljob","openApiOperationId":"cancelJob","summary":"Cancel job","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Job canceled successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIJobStatusResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/AIJobStatusResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/200/content/application~1json/example"]},{"code":"400","description":"Job cannot be canceled","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/400/content/application~1json/example"]}},"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/400/content/application~1json/example"]},{"code":"401","description":"Unauthorized - API key required"},{"code":"404","description":"Job not found or does not belong to the authenticated agent","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/404/content/application~1json/example"]}},"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/404/content/application~1json/example"]}],"pointer":"/paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/AIJobStatusResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIJobStatusResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/400/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/400/content/application~1json/example"]}}},{"code":"401"},{"code":"404","schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/404/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/AIErrorResponse","exampleIds":["paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/404/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/ai/canceljob"}],"panels":[]}]},"httpPath":"/trip-imports/{publicId}/actions/cancel"}],"content":{"contentType":"group","meta":{"name":"ai"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"ai","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI-powered trip generation from documents and text."},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Base URL:"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"https://ai.api.moguplatform.com"},"children":[],"type":"code"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI endpoints use a separate server from Trips & Catalogs endpoints."},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Public vs authenticated responses:"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" The "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"GET /trip-imports/{publicId}/status"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" endpoint is public and does not require authentication. Public responses omit the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" message and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"aiCredits"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" fields. Authenticated endpoints return the full response including error details and credits consumed."},"children":[],"type":"text"}],"type":"paragraph"}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/trip-imports","summary":"Create trip from document","prefix":{"name":"post","color":"post"},"badges":[],"link":"/ai/createtripfromdocument","deprecated":false},{"title":"/trip-imports/{publicId}/status","summary":"Get job status","prefix":{"name":"get","color":"get"},"badges":[],"link":"/ai/getjobstatus","deprecated":false},{"title":"/trip-imports/{publicId}/actions/cancel","summary":"Cancel job","prefix":{"name":"post","color":"post"},"badges":[],"link":"/ai/canceljob","deprecated":false}]}]}]}]}},{"type":"group","label":"trips","link":"/openapi/trips","routeSlug":"/openapi/trips","items":[{"label":"Get trips","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/listtrips","routeSlug":"/openapi/trips/listtrips","metadata":{"seo":{"title":"Get trips","description":"Retrieve a paginated list of trips with optional filtering and sorting"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listTrips","name":"Get trips","isWebhook":false,"pointer":"/paths/~1trips/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get trips","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve a paginated list of trips with optional filtering and sorting"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"page","in":"query","schemaId":"schema_2","description":"Page number (starts at 1)"},{"name":"pageSize","in":"query","schemaId":"schema_3","description":"Number of items per page"},{"name":"filters","in":"query","style":"form","explode":false,"schemaId":"schema_4","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"JSON array of filters, e.g. [{\"field\":\"duration\",\"operator\":\"gte\",\"value\":5}]"},"children":[],"type":"text"}],"type":"paragraph"}]},{"name":"orderBy","in":"query","style":"form","explode":false,"schemaId":"schema_5","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"JSON object for sorting, e.g. {\"field\":\"createdAt\",\"direction\":\"desc\"}"},"children":[],"type":"text"}],"type":"paragraph"}]},{"name":"search","in":"query","style":"form","explode":false,"schemaId":"schema_6","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"JSON object for searching, e.g. {\"fields\":[\"title\"],\"term\":\"Paris\"}"},"children":[],"type":"text"}],"type":"paragraph"}]}],"pointer":"/paths/~1trips/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/trips","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[],"query":[{"name":"page","in":"query","required":false,"example":1,"schemaId":"schema_2"},{"name":"pageSize","in":"query","required":false,"example":20,"schemaId":"schema_3"},{"name":"filters","in":"query","required":false,"example":"[{\"field\":\"duration\",\"operator\":\"gte\",\"value\":5}]","schemaId":"schema_4","style":"form","explode":false},{"name":"orderBy","in":"query","required":false,"example":"{\"field\":\"createdAt\",\"direction\":\"desc\"}","schemaId":"schema_5","style":"form","explode":false},{"name":"search","in":"query","required":false,"example":"{\"fields\":[\"title\"],\"term\":\"Paris\"}","schemaId":"schema_6","style":"form","explode":false}],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400"],"pointer":"/trips","href":"trips/listtrips","openApiOperationId":"listTrips","summary":"Get trips","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful response with paginated trips","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripListResponse"}},"schemaId":"components/schemas/TripListResponse"},{"code":"400","description":"Invalid request parameters"}],"pointer":"/paths/~1trips/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/TripListResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripListResponse"}}},{"code":"400"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/listtrips"}],"panels":[]}]},"httpPath":"/trips"},{"label":"Create trip","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/createtrip","routeSlug":"/openapi/trips/createtrip","metadata":{"seo":{"title":"Create trip","description":"Create a new trip with the specified details. Supports two authentication modes: a user-bound bearer token (default bearerAuth) or a server-to-server M2M token combined with the x-on-behalf-of header to act on behalf of an existing agent.Both schemes are accepted on every authenticated operation in this specification — see the m2mOnBehalfOf security scheme description for the full scope-based model.Trip custom fields can be set at creation time via the optional x-custom-header directive header (see that parameter)."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createTrip","name":"Create trip","isWebhook":false,"pointer":"/paths/~1trips/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create trip","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Create a new trip with the specified details. Supports two authentication modes: a user-bound bearer token (default "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") or a server-to-server M2M token combined with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to act on behalf of an existing agent."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Both schemes are accepted on every authenticated operation in this specification — see the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme description for the full scope-based model."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Trip custom fields can be set at creation time via the optional "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-custom-header"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" directive header (see that parameter)."},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-custom-header","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Generic directive header. Its first "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":":"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"-separated segment is a directive that selects how the rest is interpreted, so the same header can carry unrelated directives in the future — unknown directives are ignored."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The only directive currently supported is "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_custom_field"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", which sets a trip custom field at creation time, in the form "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_custom_field:<fieldName>:<value>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":":"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"<fieldName>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is matched against the account's trip custom fields by"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"exact name"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" (e.g. "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idOpp"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). If the account has no field with that"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"name the directive is "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"silently ignored"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" — the trip is still created."},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"<value>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is stored as the field value, cast to the field's type"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"(e.g. "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Number"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" fields are parsed as numbers). It may contain "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":":"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" but"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"not"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":","},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Send the header several times (HTTP combines duplicates into one comma-separated value) to set multiple fields."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"single":{"summary":"Set a single trip custom field by name","value":"trip_custom_field:idOpp:1989"},"multiple":{"summary":"Set several custom fields at once","value":"trip_custom_field:idOpp:1989, trip_custom_field:source:web"}}},{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_7"}},"schemaId":"schema_7","pointer":"/paths/~1trips/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/trips","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"x-custom-header","in":"header","required":false,"example":"trip_custom_field:idOpp:1989","schemaId":"schema_0"},{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_7"}},"responseCodes":["201","400","401","403"],"pointer":"/trips","href":"trips/createtrip","openApiOperationId":"createTrip","summary":"Create trip","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"schema_7","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_7"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Trip created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Trip","exampleIds":["paths/~1trips/post/responses/201/content/application~1json/example"]}},"schemaId":"components/schemas/Trip","exampleIds":["paths/~1trips/post/responses/201/content/application~1json/example"]},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Invalid request body, malformed or duplicated "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header"},"children":[],"type":"text"}],"type":"paragraph"}]},{"code":"401","description":"Missing/invalid token, or M2M client not registered"},{"code":"403","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Caller is not authorized to perform the operation. Returned by the on-behalf-of flow as a uniform response for every failure branch — unknown agent, agent without a usable account, account outside the M2M grant, or agent without membership in the resolved account — so M2M callers cannot enumerate platform email addresses by inspecting response shapes."},"children":[],"type":"text"}],"type":"paragraph"}]}],"pointer":"/paths/~1trips/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/Trip","exampleIds":["paths/~1trips/post/responses/201/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Trip","exampleIds":["paths/~1trips/post/responses/201/content/application~1json/example"]}}},{"code":"400"},{"code":"401"},{"code":"403"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/createtrip"}],"panels":[]}]},"httpPath":"/trips"},{"label":"Delete trips in bulk","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/deletetripsinbulk","routeSlug":"/openapi/trips/deletetripsinbulk","metadata":{"seo":{"title":"Delete trips in bulk","description":"Delete multiple trips at once. Uses POST method for bulk operations."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"deleteTripsInBulk","name":"Delete trips in bulk","isWebhook":false,"pointer":"/paths/~1trips~1bulk-delete/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Delete trips in bulk","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Delete multiple trips at once. Uses POST method for bulk operations."},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips~1bulk-delete/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_8"}},"schemaId":"schema_8","pointer":"/paths/~1trips~1bulk-delete/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/trips/bulk-delete","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_8"}},"responseCodes":["200","400"],"pointer":"/trips/bulk-delete","href":"trips/deletetripsinbulk","openApiOperationId":"deleteTripsInBulk","summary":"Delete trips in bulk","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"schema_8","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_8"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Trips deleted successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}},"schemaId":"schema_9"},{"code":"400","description":"Invalid request body"}],"pointer":"/paths/~1trips~1bulk-delete/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_9","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}}},{"code":"400"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/deletetripsinbulk"}],"panels":[]}]},"httpPath":"/trips/bulk-delete"},{"label":"Get trip","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/gettripbyid","routeSlug":"/openapi/trips/gettripbyid","metadata":{"seo":{"title":"Get trip","description":"Retrieve detailed information about a specific trip"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getTripById","name":"Get trip","isWebhook":false,"pointer":"/paths/~1trips~1{tripId}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get trip","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve detailed information about a specific trip"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"tripId","in":"path","schemaId":"schema_10","description":"Unique identifier of the trip","required":true}],"pointer":"/paths/~1trips~1{tripId}/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips~1{tripId}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/trips/{tripId}","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"tripId","in":"path","required":true,"example":12345,"schemaId":"schema_10"}],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","404"],"pointer":"/trips/{tripId}","href":"trips/gettripbyid","openApiOperationId":"getTripById","summary":"Get trip","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Trip details retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Trip","exampleIds":["paths/~1trips~1{tripId}/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/Trip","exampleIds":["paths/~1trips~1{tripId}/get/responses/200/content/application~1json/example"]},{"code":"404","description":"Trip not found"}],"pointer":"/paths/~1trips~1{tripId}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Trip","exampleIds":["paths/~1trips~1{tripId}/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Trip","exampleIds":["paths/~1trips~1{tripId}/get/responses/200/content/application~1json/example"]}}},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/gettripbyid"}],"panels":[]}]},"httpPath":"/trips/{tripId}"},{"label":"Update trip","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/updatetrip","routeSlug":"/openapi/trips/updatetrip","metadata":{"seo":{"title":"Update trip","description":"Update an existing trip's details. metadata.ai is MOGU's own: a value sent in metadata is ignored."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateTrip","name":"Update trip","isWebhook":false,"pointer":"/paths/~1trips~1{tripId}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update trip","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Update an existing trip's details. "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"metadata.ai"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is MOGU's own: a value sent in "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"metadata"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is ignored."},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"tripId","in":"path","schemaId":"schema_10","description":"Unique identifier of the trip","required":true}],"pointer":"/paths/~1trips~1{tripId}/patch/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"ai","in":"query","schemaId":"schema_11","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Send "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" when the text this request saves was written by an AI system: MOGU then marks the trip as AI-generated (EU AI Act Art. 50(2)). The mark is never removed. Any other value is refused."},"children":[],"type":"text"}],"type":"paragraph"}]}],"pointer":"/paths/~1trips~1{tripId}/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips~1{tripId}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_12"}},"schemaId":"schema_12","pointer":"/paths/~1trips~1{tripId}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/trips/{tripId}","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"tripId","in":"path","required":true,"example":12345,"schemaId":"schema_10"}],"query":[{"name":"ai","in":"query","required":false,"schemaId":"schema_11"}],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_12"}},"responseCodes":["200","400","404","409"],"pointer":"/trips/{tripId}","href":"trips/updatetrip","openApiOperationId":"updateTrip","summary":"Update trip","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"schema_12","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_12"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Trip updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Trip"}},"schemaId":"components/schemas/Trip"},{"code":"400","description":"Invalid request"},{"code":"404","description":"Trip not found"},{"code":"409","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The update conflicts with the trip's state. "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"slug_already_in_use"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" when another trip has the slug, "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_party_frozen"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" when the trip has a firm booking, or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_party_quoted"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" when it quotes services priced for its current party."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_13"}},"schemaId":"schema_13"}],"pointer":"/paths/~1trips~1{tripId}/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Trip","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Trip"}}},{"code":"400"},{"code":"404"},{"code":"409","schemaId":"schema_13","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_13"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/updatetrip"}],"panels":[]}]},"httpPath":"/trips/{tripId}"},{"label":"Delete trip","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/deletetrip","routeSlug":"/openapi/trips/deletetrip","metadata":{"seo":{"title":"Delete trip","description":"Delete a specific trip by ID"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"deleteTrip","name":"Delete trip","isWebhook":false,"pointer":"/paths/~1trips~1{tripId}/delete","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Delete trip","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Delete a specific trip by ID"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"tripId","in":"path","schemaId":"schema_10","description":"Unique identifier of the trip","required":true}],"pointer":"/paths/~1trips~1{tripId}/delete/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips~1{tripId}/delete/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/trips/{tripId}","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"tripId","in":"path","required":true,"example":12345,"schemaId":"schema_10"}],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","404","409"],"pointer":"/trips/{tripId}","href":"trips/deletetrip","openApiOperationId":"deleteTrip","summary":"Delete trip","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Trip deleted successfully"},{"code":"404","description":"Trip not found"},{"code":"409","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Not deleted: a booking of the trip is still in progress with a provider (a service it holds that is pending or not past the trip's last day, or a provider request still open). "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error.code"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_has_unfinished_bookings"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error.data.bookingIds"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" names the bookings."},"children":[],"type":"text"}],"type":"paragraph"}]}],"pointer":"/paths/~1trips~1{tripId}/delete/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/deletetrip"}],"panels":[]}]},"httpPath":"/trips/{tripId}"},{"label":"Start a trip PDF","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/createtrippdfjob","routeSlug":"/openapi/trips/createtrippdfjob","metadata":{"seo":{"title":"Start a trip PDF","description":"Starts rendering the trip as the PDF a traveler downloads from the trip page, in the trip's language and with its theme, and answers at once with a job. Poll its status link every few seconds until it is completed, then follow its file link. Asking again for the same trip, unchanged, with the same sections while a job for it is still running answers with that same job; once a PDF is done, asking again renders a new one, so prices and branding are always current. Requires the read:trips scope and read access to the trip. The trip's \"allow PDF download\" setting applies only to callers from other accounts the trip is shared with. Each account may start up to 30 PDF jobs per minute, refused ones included."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createTripPdfJob","name":"Start a trip PDF","isWebhook":false,"pointer":"/paths/~1trips~1{tripId}~1pdf-jobs/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Start a trip PDF","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Starts rendering the trip as the PDF a traveler downloads from the trip page, in the trip's language and with its theme, and answers at once with a job. Poll its "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"status"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" link every few seconds until it is "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"completed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", then follow its "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"file"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" link. Asking again for the same trip, unchanged, with the same sections while a job for it is still running answers with that same job; once a PDF is done, asking again renders a new one, so prices and branding are always current. Requires the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" scope and read access to the trip. The trip's \"allow PDF download\" setting applies only to callers from other accounts the trip is shared with. Each account may start up to 30 PDF jobs per minute, refused ones included."},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"tripId","in":"path","schemaId":"schema_10","description":"Unique identifier of the trip","required":true}],"pointer":"/paths/~1trips~1{tripId}~1pdf-jobs/post/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips~1{tripId}~1pdf-jobs/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":false,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_14"}},"schemaId":"schema_14","pointer":"/paths/~1trips~1{tripId}~1pdf-jobs/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/trips/{tripId}/pdf-jobs","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"tripId","in":"path","required":true,"example":12345,"schemaId":"schema_10"}],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_14"}},"responseCodes":["202","400","401","403","404","422","429"],"pointer":"/trips/{tripId}/pdf-jobs","href":"trips/createtrippdfjob","openApiOperationId":"createTripPdfJob","summary":"Start a trip PDF","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"schema_14","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_14"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"202","description":"The job that makes the PDF","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfJobCreatedResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/202/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfJobCreatedResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/202/content/application~1json/example"]},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"exclude"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is not a string of up to 500 characters"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/400/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/400/content/application~1json/example"]},{"code":"401","description":"Missing or invalid credentials","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/401/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/401/content/application~1json/example"]},{"code":"403","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The credentials lack the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" scope, the caller may not read the trip, or the trip does not exist. "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_download_disabled"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" when the trip belongs to another account and its agent turned PDF download off."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/403/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/403/content/application~1json/example"]},{"code":"404","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The trip id is not a number, the caller's account has no active subscription, or ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_not_enabled"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") PDF generation is not available for the account that owns the trip."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/404/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/404/content/application~1json/example"]},{"code":"422","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The trip's theme has no PDF yet ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_theme_unsupported"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/422/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/422/content/application~1json/example"]},{"code":"429","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The account started more than 30 PDF jobs in a minute ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_rate_limited"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/429/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/429/content/application~1json/example"],"headers":{"Retry-After":{"description":"Seconds until the limit resets","schema":{"type":"integer","example":42}}},"headerSchemaId":"schema_15"}],"pointer":"/paths/~1trips~1{tripId}~1pdf-jobs/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"202","schemaId":"components/schemas/TripPdfJobCreatedResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/202/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfJobCreatedResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/202/content/application~1json/example"]}}},{"code":"400","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/400/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/400/content/application~1json/example"]}}},{"code":"401","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/401/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/401/content/application~1json/example"]}}},{"code":"403","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/403/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/403/content/application~1json/example"]}}},{"code":"404","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/404/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/404/content/application~1json/example"]}}},{"code":"422","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/422/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/422/content/application~1json/example"]}}},{"code":"429","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/429/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1{tripId}~1pdf-jobs/post/responses/429/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/createtrippdfjob"}],"panels":[]}]},"httpPath":"/trips/{tripId}/pdf-jobs"},{"label":"Get trip PDF job status","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/gettrippdfjobstatus","routeSlug":"/openapi/trips/gettrippdfjobstatus","metadata":{"seo":{"title":"Get trip PDF job status","description":"Where a trip PDF job stands. Public: the job id is the key. A job that no renderer answered for six minutes is reported as failed with trip_pdf_failed. Renders usually take seconds, up to about four minutes for the longest trips."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getTripPdfJobStatus","name":"Get trip PDF job status","isWebhook":false,"pointer":"/paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get trip PDF job status","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Where a trip PDF job stands. Public: the job id is the key. A job that no renderer answered for six minutes is reported as "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"failed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_failed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". Renders usually take seconds, up to about four minutes for the longest trips."},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"jobId","in":"path","schemaId":"schema_16","description":"Public id of the job, from the job's response","required":true}],"pointer":"/paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/trips/public/pdf-jobs/{jobId}/status","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"jobId","in":"path","required":true,"example":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b","schemaId":"schema_16"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"responseCodes":["200","404"],"pointer":"/trips/public/pdf-jobs/{jobId}/status","href":"trips/gettrippdfjobstatus","openApiOperationId":"getTripPdfJobStatus","summary":"Get trip PDF job status"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"The job's status","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfJobStatusResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/running","paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/completed","paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/failed"]}},"schemaId":"components/schemas/TripPdfJobStatusResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/running","paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/completed","paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/failed"]},{"code":"404","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"No PDF job has that id ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_job_not_found"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/404/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/404/content/application~1json/example"]}],"pointer":"/paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/TripPdfJobStatusResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/running","paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/completed","paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/failed"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfJobStatusResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/running","paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/completed","paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/failed"]}}},{"code":"404","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/404/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/404/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/gettrippdfjobstatus"}],"panels":[]}]},"httpPath":"/trips/public/pdf-jobs/{jobId}/status"},{"label":"Download a trip PDF","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/gettrippdfjobfile","routeSlug":"/openapi/trips/gettrippdfjobfile","metadata":{"seo":{"title":"Download a trip PDF","description":"Redirects to the job's finished PDF: a link valid for five minutes that serves it inline, under a file name built from the trip title and code. Public: the job id is the key. The PDF is kept for 24 hours; after that, start a new job."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getTripPdfJobFile","name":"Download a trip PDF","isWebhook":false,"pointer":"/paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Download a trip PDF","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Redirects to the job's finished PDF: a link valid for five minutes that serves it inline, under a file name built from the trip title and code. Public: the job id is the key. The PDF is kept for 24 hours; after that, start a new job.\n"},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"jobId","in":"path","schemaId":"schema_16","description":"Public id of the job, from the job's response","required":true}],"pointer":"/paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/trips/public/pdf-jobs/{jobId}/file","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"jobId","in":"path","required":true,"example":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b","schemaId":"schema_16"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"responseCodes":["302","404","409","410","500","504"],"pointer":"/trips/public/pdf-jobs/{jobId}/file","href":"trips/gettrippdfjobfile","openApiOperationId":"getTripPdfJobFile","summary":"Download a trip PDF"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"302","description":"The PDF is ready; follow the redirect to download it","headers":{"Location":{"description":"Signed link to the PDF, valid for five minutes","schema":{"type":"string","format":"uri","example":"https://storage.googleapis.com/mogu-prod-v2-customers/trip-pdfs/6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b.pdf?X-Goog-Signature=..."}}},"headerSchemaId":"schema_17"},{"code":"404","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"No PDF job has that id ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_job_not_found"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/404/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/404/content/application~1json/example"]},{"code":"409","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The job has not finished; poll its status ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_not_ready"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/409/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/409/content/application~1json/example"]},{"code":"410","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The PDF is older than 24 hours and was deleted; start a new job ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_expired"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/410/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/410/content/application~1json/example"]},{"code":"500","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The render failed or stopped answering; a new job may work ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_failed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/500/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/500/content/application~1json/example"]},{"code":"504","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The trip is too long to render; a new job fails the same way ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_timed_out"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/504/content/application~1json/example"]}},"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/504/content/application~1json/example"]}],"pointer":"/paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"302"},{"code":"404","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/404/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/404/content/application~1json/example"]}}},{"code":"409","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/409/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/409/content/application~1json/example"]}}},{"code":"410","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/410/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/410/content/application~1json/example"]}}},{"code":"500","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/500/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/500/content/application~1json/example"]}}},{"code":"504","schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/504/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripPdfErrorResponse","exampleIds":["paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/504/content/application~1json/example"]}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/gettrippdfjobfile"}],"panels":[]}]},"httpPath":"/trips/public/pdf-jobs/{jobId}/file"},{"label":"Get trip configuration","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/gettripconfig","routeSlug":"/openapi/trips/gettripconfig","metadata":{"seo":{"title":"Get trip configuration","description":"Retrieve the complete configuration for a trip, including blocks, contact info, settings, and theme"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getTripConfig","name":"Get trip configuration","isWebhook":false,"pointer":"/paths/~1trips~1{tripId}~1config/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get trip configuration","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve the complete configuration for a trip, including blocks, contact info, settings, and theme"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"tripId","in":"path","schemaId":"schema_10","description":"Unique identifier of the trip","required":true}],"pointer":"/paths/~1trips~1{tripId}~1config/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips~1{tripId}~1config/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/trips/{tripId}/config","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"tripId","in":"path","required":true,"example":12345,"schemaId":"schema_10"}],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","404"],"pointer":"/trips/{tripId}/config","href":"trips/gettripconfig","openApiOperationId":"getTripConfig","summary":"Get trip configuration","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Trip configuration retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripConfig"}},"schemaId":"components/schemas/TripConfig"},{"code":"400","description":"Invalid trip ID"},{"code":"404","description":"Trip config not found"}],"pointer":"/paths/~1trips~1{tripId}~1config/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/TripConfig","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TripConfig"}}},{"code":"400"},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/gettripconfig"}],"panels":[]}]},"httpPath":"/trips/{tripId}/config"},{"label":"Update trip configuration","deprecated":false,"httpVerb":"put","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/trips/updatetripconfig","routeSlug":"/openapi/trips/updatetripconfig","metadata":{"seo":{"title":"Update trip configuration","description":"Update the complete configuration for a trip (replaces existing config). When a service block brings a new or changed googlePlaceId (or a transport's arrivalGooglePlaceId) without coordinates, MOGU fills it from Google Places on save: coordinates, formatted address, locality, phone, website, rating and up to three photos. Fields you send are kept, and Google photos are placed before your own images. Re-sending a block with the same id and place keeps the data already filled, so you don't need to echo it back. A place that cannot be filled in time is stored as sent; its lookup finishes in the background and the next save of that block fills it. An unknown ID, a place Google failed on, or places beyond 50 new ones in one save are stored as sent and not looked up again while the block keeps the same place: send lat and lon yourself, or send the block under a new id."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateTripConfig","name":"Update trip configuration","isWebhook":false,"pointer":"/paths/~1trips~1{tripId}~1config/put","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update trip configuration","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Update the complete configuration for a trip (replaces existing config). When a service block brings a new or changed "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"googlePlaceId"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" (or a transport's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"arrivalGooglePlaceId"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") without coordinates, MOGU fills it from Google Places on save: coordinates, formatted address, locality, phone, website, rating and up to three photos. Fields you send are kept, and Google photos are placed before your own images. Re-sending a block with the same id and place keeps the data already filled, so you don't need to echo it back. A place that cannot be filled in time is stored as sent; its lookup finishes in the background and the next save of that block fills it. An unknown ID, a place Google failed on, or places beyond 50 new ones in one save are stored as sent and not looked up again while the block keeps the same place: send "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lat"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lon"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" yourself, or send the block under a new id."},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"tripId","in":"path","schemaId":"schema_10","description":"Unique identifier of the trip","required":true}],"pointer":"/paths/~1trips~1{tripId}~1config/put/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"ai","in":"query","schemaId":"schema_11","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Send "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" when the text this request saves was written by an AI system: MOGU then marks the trip as AI-generated (EU AI Act Art. 50(2)). The mark is never removed. Any other value is refused."},"children":[],"type":"text"}],"type":"paragraph"}]}],"pointer":"/paths/~1trips~1{tripId}~1config/put/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1trips~1{tripId}~1config/put/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/TripConfigUpdate"}},"schemaId":"components/schemas/TripConfigUpdate","pointer":"/paths/~1trips~1{tripId}~1config/put/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PUT","path":"/trips/{tripId}/config","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"tripId","in":"path","required":true,"example":12345,"schemaId":"schema_10"}],"query":[{"name":"ai","in":"query","required":false,"schemaId":"schema_11"}],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/TripConfigUpdate"}},"responseCodes":["200","400","404","422"],"pointer":"/trips/{tripId}/config","href":"trips/updatetripconfig","openApiOperationId":"updateTripConfig","summary":"Update trip configuration","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"components/schemas/TripConfigUpdate","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/TripConfigUpdate"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Configuration updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_18"}},"schemaId":"schema_18"},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Invalid request body or dangerous update attempt. Also returned when a payment block's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"sections[].services[]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" entry is not a complete service block (an "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", a service "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"type"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and a "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"content"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" object) and the trip did not already hold it unchanged; each such service is listed in "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"errors[]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" with a "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"path"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" such as "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"blocks.<blockId>.sections[0].services[1]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}]},{"code":"404","description":"Trip not found"},{"code":"422","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The save adds a Booking block ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"type: payment"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") to a trip of an account that reserves through the booking engine ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error.code"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"booking_block_not_available"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"), or adds a Form block ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"type: form"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") to a trip of an account whose Form blocks are not enabled ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"form_block_not_available"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). A block the trip already holds can still be saved."},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_19"}},"schemaId":"schema_19"}],"pointer":"/paths/~1trips~1{tripId}~1config/put/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_18","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_18"}}},{"code":"400"},{"code":"404"},{"code":"422","schemaId":"schema_19","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_19"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/trips/updatetripconfig"}],"panels":[]}]},"httpPath":"/trips/{tripId}/config"}],"content":{"contentType":"group","meta":{"name":"trips"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"trips","showPageActions":true},{"nodeType":"markdoc","content":"Operations for managing trips"}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/trips","summary":"Get trips","prefix":{"name":"get","color":"get"},"badges":[],"link":"/trips/listtrips","deprecated":false},{"title":"/trips","summary":"Create trip","prefix":{"name":"post","color":"post"},"badges":[],"link":"/trips/createtrip","deprecated":false},{"title":"/trips/bulk-delete","summary":"Delete trips in bulk","prefix":{"name":"post","color":"post"},"badges":[],"link":"/trips/deletetripsinbulk","deprecated":false},{"title":"/trips/{tripId}","summary":"Get trip","prefix":{"name":"get","color":"get"},"badges":[],"link":"/trips/gettripbyid","deprecated":false},{"title":"/trips/{tripId}","summary":"Update trip","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/trips/updatetrip","deprecated":false},{"title":"/trips/{tripId}","summary":"Delete trip","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/trips/deletetrip","deprecated":false},{"title":"/trips/{tripId}/pdf-jobs","summary":"Start a trip PDF","prefix":{"name":"post","color":"post"},"badges":[],"link":"/trips/createtrippdfjob","deprecated":false},{"title":"/trips/public/pdf-jobs/{jobId}/status","summary":"Get trip PDF job status","prefix":{"name":"get","color":"get"},"badges":[],"link":"/trips/gettrippdfjobstatus","deprecated":false},{"title":"/trips/public/pdf-jobs/{jobId}/file","summary":"Download a trip PDF","prefix":{"name":"get","color":"get"},"badges":[],"link":"/trips/gettrippdfjobfile","deprecated":false},{"title":"/trips/{tripId}/config","summary":"Get trip configuration","prefix":{"name":"get","color":"get"},"badges":[],"link":"/trips/gettripconfig","deprecated":false},{"title":"/trips/{tripId}/config","summary":"Update trip configuration","prefix":{"name":"put","color":"put"},"badges":[],"link":"/trips/updatetripconfig","deprecated":false}]}]}]}]}},{"type":"group","label":"catalogs","link":"/openapi/catalogs","routeSlug":"/openapi/catalogs","items":[{"label":"Get catalogs","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/catalogs/listcatalogs","routeSlug":"/openapi/catalogs/listcatalogs","metadata":{"seo":{"title":"Get catalogs","description":"Retrieve a paginated list of catalogs"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"listCatalogs","name":"Get catalogs","isWebhook":false,"pointer":"/paths/~1catalogs/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get catalogs","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve a paginated list of catalogs"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"page","in":"query","schemaId":"schema_2","description":"Page number"},{"name":"pageSize","in":"query","schemaId":"schema_3","description":"Items per page"},{"name":"filters","in":"query","schemaId":"schema_20","description":"JSON array of filters"},{"name":"orderBy","in":"query","schemaId":"schema_21","description":"JSON object for sorting"},{"name":"search","in":"query","schemaId":"schema_22","description":"JSON object for searching"}],"pointer":"/paths/~1catalogs/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1catalogs/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/catalogs","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[],"query":[{"name":"page","in":"query","required":false,"example":1,"schemaId":"schema_2"},{"name":"pageSize","in":"query","required":false,"example":20,"schemaId":"schema_3"},{"name":"filters","in":"query","required":false,"example":"[]","schemaId":"schema_20"},{"name":"orderBy","in":"query","required":false,"example":"{\"field\":\"title\",\"direction\":\"asc\"}","schemaId":"schema_21"},{"name":"search","in":"query","required":false,"example":"{\"fields\":[\"title\"],\"term\":\"Europe\"}","schemaId":"schema_22"}],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400"],"pointer":"/catalogs","href":"catalogs/listcatalogs","openApiOperationId":"listCatalogs","summary":"Get catalogs","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful response with paginated catalogs","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CatalogListResponse"}},"schemaId":"components/schemas/CatalogListResponse"},{"code":"400","description":"Invalid request parameters"}],"pointer":"/paths/~1catalogs/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/CatalogListResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CatalogListResponse"}}},{"code":"400"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/catalogs/listcatalogs"}],"panels":[]}]},"httpPath":"/catalogs"},{"label":"Create catalog","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/catalogs/createcatalog","routeSlug":"/openapi/catalogs/createcatalog","metadata":{"seo":{"title":"Create catalog","description":"Create a new catalog with the specified details"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createCatalog","name":"Create catalog","isWebhook":false,"pointer":"/paths/~1catalogs/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create catalog","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Create a new catalog with the specified details"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1catalogs/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/CatalogCreate","exampleIds":["paths/~1catalogs/post/requestBody/content/application~1json/examples/minimal","paths/~1catalogs/post/requestBody/content/application~1json/examples/customLogo"]}},"schemaId":"components/schemas/CatalogCreate","exampleIds":["paths/~1catalogs/post/requestBody/content/application~1json/examples/minimal","paths/~1catalogs/post/requestBody/content/application~1json/examples/customLogo"],"pointer":"/paths/~1catalogs/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/catalogs","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/CatalogCreate","exampleIds":["paths/~1catalogs/post/requestBody/content/application~1json/examples/minimal","paths/~1catalogs/post/requestBody/content/application~1json/examples/customLogo"]}},"responseCodes":["201","400"],"pointer":"/catalogs","href":"catalogs/createcatalog","openApiOperationId":"createCatalog","summary":"Create catalog","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"components/schemas/CatalogCreate","exampleIds":["paths/~1catalogs/post/requestBody/content/application~1json/examples/minimal","paths/~1catalogs/post/requestBody/content/application~1json/examples/customLogo"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/CatalogCreate","exampleIds":["paths/~1catalogs/post/requestBody/content/application~1json/examples/minimal","paths/~1catalogs/post/requestBody/content/application~1json/examples/customLogo"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Catalog created successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Catalog","exampleIds":["paths/~1catalogs/post/responses/201/content/application~1json/example"]}},"schemaId":"components/schemas/Catalog","exampleIds":["paths/~1catalogs/post/responses/201/content/application~1json/example"]},{"code":"400","description":"Invalid request body"}],"pointer":"/paths/~1catalogs/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/Catalog","exampleIds":["paths/~1catalogs/post/responses/201/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Catalog","exampleIds":["paths/~1catalogs/post/responses/201/content/application~1json/example"]}}},{"code":"400"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/catalogs/createcatalog"}],"panels":[]}]},"httpPath":"/catalogs"},{"label":"Delete catalogs in bulk","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/catalogs/deletecatalogsinbulk","routeSlug":"/openapi/catalogs/deletecatalogsinbulk","metadata":{"seo":{"title":"Delete catalogs in bulk","description":"Delete multiple catalogs at once."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"deleteCatalogsInBulk","name":"Delete catalogs in bulk","isWebhook":false,"pointer":"/paths/~1catalogs/delete","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Delete catalogs in bulk","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Delete multiple catalogs at once."},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1catalogs/delete/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_23"}},"schemaId":"schema_23","pointer":"/paths/~1catalogs/delete/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/catalogs","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_23"}},"responseCodes":["200","400"],"pointer":"/catalogs","href":"catalogs/deletecatalogsinbulk","openApiOperationId":"deleteCatalogsInBulk","summary":"Delete catalogs in bulk","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"schema_23","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_23"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Catalogs deleted successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_24"}},"schemaId":"schema_24"},{"code":"400","description":"Invalid request body"}],"pointer":"/paths/~1catalogs/delete/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_24","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_24"}}},{"code":"400"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/catalogs/deletecatalogsinbulk"}],"panels":[]}]},"httpPath":"/catalogs"},{"label":"Get catalog","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/catalogs/getcatalogbyid","routeSlug":"/openapi/catalogs/getcatalogbyid","metadata":{"seo":{"title":"Get catalog","description":"Retrieve detailed information about a specific catalog"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getCatalogById","name":"Get catalog","isWebhook":false,"pointer":"/paths/~1catalogs~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get catalog","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve detailed information about a specific catalog"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_25","description":"Unique identifier of the catalog","required":true}],"pointer":"/paths/~1catalogs~1{id}/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1catalogs~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/catalogs/{id}","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":101,"schemaId":"schema_25"}],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","404"],"pointer":"/catalogs/{id}","href":"catalogs/getcatalogbyid","openApiOperationId":"getCatalogById","summary":"Get catalog","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Catalog details","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Catalog","exampleIds":["paths/~1catalogs~1{id}/get/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/Catalog","exampleIds":["paths/~1catalogs~1{id}/get/responses/200/content/application~1json/example"]},{"code":"404","description":"Catalog not found"}],"pointer":"/paths/~1catalogs~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Catalog","exampleIds":["paths/~1catalogs~1{id}/get/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Catalog","exampleIds":["paths/~1catalogs~1{id}/get/responses/200/content/application~1json/example"]}}},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/catalogs/getcatalogbyid"}],"panels":[]}]},"httpPath":"/catalogs/{id}"},{"label":"Update catalog","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/catalogs/updatecatalog","routeSlug":"/openapi/catalogs/updatecatalog","metadata":{"seo":{"title":"Update catalog","description":"Update catalog details and associated trips"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateCatalog","name":"Update catalog","isWebhook":false,"pointer":"/paths/~1catalogs~1{id}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update catalog","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Update catalog details and associated trips"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_25","description":"Unique identifier of the catalog","required":true}],"pointer":"/paths/~1catalogs~1{id}/patch/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1catalogs~1{id}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_26"}},"schemaId":"schema_26","pointer":"/paths/~1catalogs~1{id}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/catalogs/{id}","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":101,"schemaId":"schema_25"}],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_26"}},"responseCodes":["200","400","404"],"pointer":"/catalogs/{id}","href":"catalogs/updatecatalog","openApiOperationId":"updateCatalog","summary":"Update catalog","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"schemaId":"schema_26","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_26"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Catalog updated successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Catalog"}},"schemaId":"components/schemas/Catalog"},{"code":"400","description":"Invalid request body"},{"code":"404","description":"Catalog not found"}],"pointer":"/paths/~1catalogs~1{id}/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Catalog","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Catalog"}}},{"code":"400"},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/catalogs/updatecatalog"}],"panels":[]}]},"httpPath":"/catalogs/{id}"},{"label":"Delete catalog","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/catalogs/deletecatalog","routeSlug":"/openapi/catalogs/deletecatalog","metadata":{"seo":{"title":"Delete catalog","description":"Delete a specific catalog by ID"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"deleteCatalog","name":"Delete catalog","isWebhook":false,"pointer":"/paths/~1catalogs~1{id}/delete","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Delete catalog","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Delete a specific catalog by ID"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerAuth","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]}]},{"schemes":[{"name":"m2mOnBehalfOf","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_25","description":"Unique identifier of the catalog","required":true}],"pointer":"/paths/~1catalogs~1{id}/delete/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"x-on-behalf-of","in":"header","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Identifies the agent the M2M client is acting on behalf of. Format: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" or "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"<email>,<account_id>"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":". When "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is omitted, the agent's "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"current_account_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Marked "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"required: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" because it is only needed when authenticating with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" security scheme — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"bearerAuth"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" requests ignore it. When using "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"m2mOnBehalfOf"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" it is mandatory; omitting it causes the request to fall through to the legacy "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"@clients"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" flow, which is not the documented public API surface."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Duplicate headers are rejected with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"400"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"examples":{"emailOnly":{"summary":"Email only","value":"agent@example.com"},"emailAndAccount":{"summary":"Email + explicit account","value":"agent@example.com,456"}}}],"pointer":"/paths/~1catalogs~1{id}/delete/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/catalogs/{id}","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"example":101,"schemaId":"schema_25"}],"query":[],"querystring":[],"header":[{"name":"x-on-behalf-of","in":"header","required":false,"example":"agent@example.com","schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerAuth","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","404"],"pointer":"/catalogs/{id}","href":"catalogs/deletecatalog","openApiOperationId":"deleteCatalog","summary":"Delete catalog","securityGroups":[{"bearerAuth":[]},{"m2mOnBehalfOf":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Catalog deleted successfully"},{"code":"404","description":"Catalog not found"}],"pointer":"/paths/~1catalogs~1{id}/delete/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/catalogs/deletecatalog"}],"panels":[]}]},"httpPath":"/catalogs/{id}"},{"label":"Get public catalog","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/catalogs/getpubliccatalog","routeSlug":"/openapi/catalogs/getpubliccatalog","metadata":{"seo":{"title":"Get public catalog","description":"Retrieve a publicly accessible catalog by slug"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getPublicCatalog","name":"Get public catalog","isWebhook":false,"pointer":"/paths/~1catalogs~1public~1{slug}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get public catalog","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve a publicly accessible catalog by slug"},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"slug","in":"path","schemaId":"schema_27","description":"Catalog slug","required":true}],"pointer":"/paths/~1catalogs~1public~1{slug}/get/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"filters","in":"query","schemaId":"schema_20","description":"JSON array of filters"}],"pointer":"/paths/~1catalogs~1public~1{slug}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/catalogs/public/{slug}","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[{"name":"slug","in":"path","required":true,"example":"european-tours","schemaId":"schema_27"}],"query":[{"name":"filters","in":"query","required":false,"example":"[]","schemaId":"schema_20"}],"querystring":[],"header":[],"cookie":[]},"security":[],"responseCodes":["200","404"],"pointer":"/catalogs/public/{slug}","href":"catalogs/getpubliccatalog","openApiOperationId":"getPublicCatalog","summary":"Get public catalog"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Public catalog details","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Catalog"}},"schemaId":"components/schemas/Catalog"},{"code":"404","description":"Catalog not found"}],"pointer":"/paths/~1catalogs~1public~1{slug}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/Catalog","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/Catalog"}}},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/catalogs/getpubliccatalog"}],"panels":[]}]},"httpPath":"/catalogs/public/{slug}"}],"content":{"contentType":"group","meta":{"name":"catalogs"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"catalogs","showPageActions":true},{"nodeType":"markdoc","content":"Operations for managing catalogs"}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/catalogs","summary":"Get catalogs","prefix":{"name":"get","color":"get"},"badges":[],"link":"/catalogs/listcatalogs","deprecated":false},{"title":"/catalogs","summary":"Create catalog","prefix":{"name":"post","color":"post"},"badges":[],"link":"/catalogs/createcatalog","deprecated":false},{"title":"/catalogs","summary":"Delete catalogs in bulk","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/catalogs/deletecatalogsinbulk","deprecated":false},{"title":"/catalogs/{id}","summary":"Get catalog","prefix":{"name":"get","color":"get"},"badges":[],"link":"/catalogs/getcatalogbyid","deprecated":false},{"title":"/catalogs/{id}","summary":"Update catalog","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/catalogs/updatecatalog","deprecated":false},{"title":"/catalogs/{id}","summary":"Delete catalog","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/catalogs/deletecatalog","deprecated":false},{"title":"/catalogs/public/{slug}","summary":"Get public catalog","prefix":{"name":"get","color":"get"},"badges":[],"link":"/catalogs/getpubliccatalog","deprecated":false}]}]}]}]}},{"type":"group","label":"status","link":"/openapi/status","routeSlug":"/openapi/status","items":[{"label":"Health check status","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/openapi/status/getstatus","routeSlug":"/openapi/status/getstatus","metadata":{"seo":{"title":"Health check status","description":"Check if the API is running"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getStatus","name":"Health check status","isWebhook":false,"pointer":"/paths/~1status/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Health check status","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Check if the API is running"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/status","servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"responseCodes":["200","503"],"pointer":"/status","href":"status/getstatus","openApiOperationId":"getStatus","summary":"Health check status"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/openapi","description":"Mock server","isMockServer":true},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"API is healthy","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_28"}},"schemaId":"schema_28"},{"code":"503","description":"Service unavailable"}],"pointer":"/paths/~1status/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_28","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_28"}}},{"code":"503"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/status/getstatus"}],"panels":[]}]},"httpPath":"/status"}],"content":{"contentType":"group","meta":{"name":"status"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"status","showPageActions":true},{"nodeType":"markdoc","content":"API health check"}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/status","summary":"Health check status","prefix":{"name":"get","color":"get"},"badges":[],"link":"/status/getstatus","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/AISourceUrl":{"id":"components/schemas/AISourceUrl","kind":"json-schema","title":"AISourceUrl","data":{"type":"object","description":"Source configuration for creating a trip from a document URL","required":["type","url"],"properties":{"type":{"type":"string","enum":["url"],"example":"url"},"url":{"type":"string","format":"uri","description":"URL of the document (PDF, TXT, or image)","example":"https://storage.example.com/itinerary.pdf"}}}},"components/schemas/AISourceText":{"id":"components/schemas/AISourceText","kind":"json-schema","title":"AISourceText","data":{"type":"object","description":"Source configuration for creating a trip from plain text or JSON","required":["type","content"],"properties":{"type":{"type":"string","enum":["text"],"example":"text"},"content":{"oneOf":[{"type":"string","description":"Plain text description of the trip","example":"5 day trip to Barcelona visiting Sagrada Familia, Park Güell, Gothic Quarter..."},{"type":"object","description":"JSON object describing the trip (will be stringified internally)","additionalProperties":true,"example":{"destination":"Barcelona","days":5,"activities":["Sagrada Familia","Park Güell","La Rambla"]}}]}}}},"components/schemas/AISourceInline":{"id":"components/schemas/AISourceInline","kind":"json-schema","title":"AISourceInline","data":{"type":"object","description":"Source configuration for creating a trip from a base64-encoded document","required":["type","content","filename"],"properties":{"type":{"type":"string","enum":["inline"],"example":"inline"},"content":{"type":"string","description":"Base64-encoded document content","example":"JVBERi0xLjQKJeLjz9MK..."},"filename":{"type":"string","description":"Filename with extension for MIME type detection (pdf, jpg, jpeg, png, bmp, tiff, tif, webp)","example":"itinerary.pdf"}}}},"components/schemas/AICreateFromDocumentRequest":{"id":"components/schemas/AICreateFromDocumentRequest","kind":"json-schema","title":"AICreateFromDocumentRequest","data":{"type":"object","description":"Request body for creating a trip from a document","required":["source"],"properties":{"source":{"oneOf":[{"$ref":"#/components/schemas/AISourceUrl"},{"$ref":"#/components/schemas/AISourceText"},{"$ref":"#/components/schemas/AISourceInline"}],"discriminator":{"propertyName":"type","mapping":{"url":"#/components/schemas/AISourceUrl","text":"#/components/schemas/AISourceText","inline":"#/components/schemas/AISourceInline"}}},"isTemplate":{"type":"boolean","description":"Create the trip as a template","default":false,"example":false}}}},"components/schemas/AICreateFromDocumentResponse":{"id":"components/schemas/AICreateFromDocumentResponse","kind":"json-schema","title":"AICreateFromDocumentResponse","data":{"type":"object","description":"Response when a job is created successfully","required":["jobId","status","links"],"properties":{"jobId":{"type":"string","format":"uuid","description":"Unique public identifier for the job","example":"1c2c38f3-e596-463e-9f62-75c7c3602770"},"status":{"type":"string","enum":["processing"],"example":"processing"},"links":{"type":"object","required":["publicUrl","builderUrl","status","cancel"],"properties":{"publicUrl":{"type":"string","format":"uri","description":"URL to the trip public page","example":"https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770"},"builderUrl":{"type":"string","format":"uri","description":"URL to the trip builder (requires authentication)","example":"https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770"},"status":{"type":"string","format":"uri","description":"API endpoint to check job status","example":"https://ai.api.moguplatform.com/trip-imports/1c2c38f3-e596-463e-9f62-75c7c3602770/status"},"cancel":{"type":"string","format":"uri","description":"API endpoint to cancel the job","example":"https://ai.api.moguplatform.com/trip-imports/1c2c38f3-e596-463e-9f62-75c7c3602770/actions/cancel"}}}}}},"components/schemas/AIJobStatusResponse":{"id":"components/schemas/AIJobStatusResponse","kind":"json-schema","title":"AIJobStatusResponse","data":{"type":"object","description":"Response with current job status","required":["jobId","status","stage","publicUrl","builderUrl","tripId","tripSlug","isTemplate","updatedAt"],"properties":{"jobId":{"type":"string","format":"uuid","description":"Unique public identifier for the job","example":"1c2c38f3-e596-463e-9f62-75c7c3602770"},"status":{"type":"string","enum":["processing","completed","error","canceled"],"description":"Current status of the job","example":"processing"},"stage":{"type":"string","enum":["initializing","extractingText","generatingBlocks","enrichingBlocks","completed"],"description":"Current processing stage","example":"enrichingBlocks"},"publicUrl":{"type":"string","format":"uri","description":"URL to the trip public page","example":"https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770"},"builderUrl":{"type":"string","format":"uri","description":"URL to the trip builder (requires authentication)","example":"https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770"},"tripId":{"type":"integer","nullable":true,"description":"Trip ID if completed, null otherwise","example":null},"tripSlug":{"type":"string","nullable":true,"description":"Trip slug if completed, null otherwise","example":null},"isTemplate":{"type":"boolean","description":"Whether the trip was created as a template","example":false},"aiCredits":{"type":"integer","nullable":true,"description":"AI credits consumed by the job. Only present in authenticated responses, omitted in public responses.","example":null},"error":{"type":"string","description":"Error message if status is error. Only present in authenticated responses, omitted in public responses.","example":"Could not extract trip information from document"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp (ISO 8601)","example":"2026-01-27T15:30:28Z"}}}},"components/schemas/AIErrorResponse":{"id":"components/schemas/AIErrorResponse","kind":"json-schema","title":"AIErrorResponse","data":{"type":"object","description":"Error response format","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code","enum":["invalid_source","invalid_url","unsupported_format","job_not_cancelable","job_not_reviewable","insufficient_credits","missing_api_key","invalid_api_key","job_not_found"],"example":"invalid_source"},"message":{"type":"string","description":"Human readable error message","example":"Source configuration is invalid"}}}}}},"components/schemas/TripPdfErrorResponse":{"id":"components/schemas/TripPdfErrorResponse","kind":"json-schema","title":"TripPdfErrorResponse","data":{"type":"object","description":"Error response of the trip PDF endpoints","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"code":{"type":"string","description":"Stable error code of a refusal specific to these endpoints. Absent on authentication, access and subscription errors, which carry only a message.\n","enum":["trip_pdf_rate_limited","trip_pdf_theme_unsupported","trip_pdf_not_enabled","trip_pdf_download_disabled","trip_pdf_timed_out","trip_pdf_failed","trip_pdf_not_ready","trip_pdf_expired","trip_pdf_job_not_found"],"example":"trip_pdf_not_ready"},"message":{"type":"string","description":"Human-readable message","example":"The PDF is not ready yet"}}}}}},"components/schemas/TripPdfJobCreatedResponse":{"id":"components/schemas/TripPdfJobCreatedResponse","kind":"json-schema","title":"TripPdfJobCreatedResponse","data":{"type":"object","description":"A trip PDF job, new or already making the same PDF","required":["jobId","status","links"],"properties":{"jobId":{"type":"string","format":"uuid","description":"Public id of the job; the key to its status and file","example":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b"},"status":{"type":"string","enum":["pending","running","completed","failed"],"description":"Where the job stands; a job reused from an earlier request may already be running","example":"pending"},"links":{"type":"object","required":["status","file"],"properties":{"status":{"type":"string","description":"Path of the job's status, relative to the Trips API server","example":"/trips/public/pdf-jobs/6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/status"},"file":{"type":"string","description":"Path of the job's PDF, relative to the Trips API server","example":"/trips/public/pdf-jobs/6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/file"}}}}}},"components/schemas/TripPdfJobStatusResponse":{"id":"components/schemas/TripPdfJobStatusResponse","kind":"json-schema","title":"TripPdfJobStatusResponse","data":{"type":"object","description":"Where a trip PDF job stands","required":["jobId","status","stage"],"properties":{"jobId":{"type":"string","format":"uuid","description":"Public id of the job","example":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b"},"status":{"type":"string","enum":["pending","running","completed","failed"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"pending"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" waits for a renderer, "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"running"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" renders, "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"completed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" has its PDF at the file link, "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"failed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" names why in "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error.code"},"children":[],"type":"code"}],"type":"paragraph"}],"example":"running"},"stage":{"type":"string","nullable":true,"enum":["queued","rendering",null],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The step the job is at: "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"queued"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" waits for a free renderer, "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"rendering"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" renders. Null before a renderer first takes it and once the PDF is done; a failed job keeps the step it stopped at."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"rendering"},"fileName":{"type":"string","description":"Only on a completed job. The name its PDF is served under, from the trip's title and code","example":"japan-in-autumn-jpn24.pdf"},"error":{"type":"object","description":"Only on a failed job","required":["code"],"properties":{"code":{"type":"string","enum":["trip_pdf_timed_out","trip_pdf_failed"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_timed_out"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": the trip is too long to render, and asking again fails the same way. "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"trip_pdf_failed"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": the render failed or stopped answering; asking again may work."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"trip_pdf_failed"}}}}}},"components/schemas/TripConfig":{"id":"components/schemas/TripConfig","kind":"json-schema","title":"TripConfig","data":{"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Complete configuration for a trip as returned by GET /trips/{id}/config. Same shape as TripConfigUpdate plus the read-only updatedAt timestamp."},"children":[],"type":"text"}],"type":"paragraph"}],"allOf":[{"$ref":"#/components/schemas/TripConfigUpdate"},{"type":"object","required":["updatedAt"],"properties":{"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp (read-only, set by the server)","example":"2025-01-20T14:45:00.000Z"}}}]}},"components/schemas/TripConfigUpdate":{"id":"components/schemas/TripConfigUpdate","kind":"json-schema","title":"TripConfigUpdate","data":{"type":"object","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Trip configuration payload. Used as the PUT /trips/{id}/config request body and reused (via TripConfig) as the GET response."},"children":[],"type":"text"}],"type":"paragraph"}],"required":["version","blocks","contact","settings","moreInfo","theme","images"],"properties":{"version":{"type":"string","description":"Semantic version of the config schema (semver)","example":"1.0.0"},"blocks":{"type":"array","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Array of content blocks (accomodations, activities, transport, etc. — see Block schema for all types)"},"children":[],"type":"text"}],"type":"paragraph"}],"items":{"$ref":"#/components/schemas/Block"}},"contact":{"$ref":"#/components/schemas/TripContact"},"slider":{"type":"array","description":"Array of image URLs for the trip slider","items":{"type":"string","format":"uri"},"example":[]},"settings":{"$ref":"#/components/schemas/TripSettings"},"moreInfo":{"description":"Additional information form shown to travelers during the booking process. Use this to collect extra details like dietary restrictions, passport info, etc.","$ref":"#/components/schemas/FormContent"},"paymentMethodId":{"type":"integer","minimum":1,"description":"ID of the payment method associated with the trip","example":42},"theme":{"$ref":"#/components/schemas/TripTheme"},"images":{"type":"object","description":"Trip image gallery","example":{"files":[]},"properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/ImageFile"}}}},"cover":{"$ref":"#/components/schemas/TripCover"},"giav":{"$ref":"#/components/schemas/TripGiavConfig"},"travelcMboxUrl":{"type":"string","format":"uri","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"URL used by the mobile app to open a webview and purchase additional services. Currently only used by TravelC trips (maps to the original "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"urlMbox"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" property)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://mbox.travelc.com/purchase/abc123"}}}},"components/schemas/Block":{"id":"components/schemas/Block","kind":"json-schema","title":"Block","data":{"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"A content block in the trip. Blocks can be of different types with specific content structures."},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Block Types:"},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Services"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": accomodation, flight, activity, food, cruise, transport, train, info"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"General"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": text, title, box, dropdown, group, file, gallery, video, map"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Pricing"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": price"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Itinerary"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": itinerary, itineraryDay"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Special"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":": servicesSummary, practicalInfo, pageBreak, form"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Note:"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" the service type is spelled "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"accomodation"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" (single middle \"m\"). This is the"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"canonical, intentional value — do not \"correct\" it to "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"accommodation"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"type":"blockquote"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Shared envelope fields."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Every block, regardless of type, carries the same envelope fields"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"(the type-specific payload lives under "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"content"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"):"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" — string identifier, "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"must be unique across the whole block tree"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"type"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" — the discriminator that selects the content shape (e.g. "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"accomodation"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"flight"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":")."},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"parent"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" — "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" of the containing block (used to model the hierarchy)."},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"children"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" — ordered array of child blocks; "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"order defines the visual order"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"hidden"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" — when "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", the block is kept but not rendered."},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"metadata"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" — key/value object. On a top-level block only "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"library"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is kept: MOGU sets"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"metadata.library.id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" on blocks inserted from the account's library, and a block linked this"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"way may have its descriptive content rewritten from the library item when the trip is saved."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"A day, group or itinerary inserted from the library may also carry "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"metadata.library.parts"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":","},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"and the blocks inside it "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"metadata.libraryPart.key"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", naming the item block each came from;"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"send them back unchanged."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Other keys on a top-level block are dropped on save; nested blocks keep their metadata as sent."},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Each block type has a specific content structure. See each block schema below."},"children":[],"type":"text"}],"type":"paragraph"}],"oneOf":[{"$ref":"#/components/schemas/BlockAccommodation"},{"$ref":"#/components/schemas/BlockFlight"},{"$ref":"#/components/schemas/BlockActivity"},{"$ref":"#/components/schemas/BlockFood"},{"$ref":"#/components/schemas/BlockTransport"},{"$ref":"#/components/schemas/BlockTrain"},{"$ref":"#/components/schemas/BlockCruise"},{"$ref":"#/components/schemas/BlockInfo"},{"$ref":"#/components/schemas/BlockText"},{"$ref":"#/components/schemas/BlockTitle"},{"$ref":"#/components/schemas/BlockBox"},{"$ref":"#/components/schemas/BlockDropdown"},{"$ref":"#/components/schemas/BlockGroup"},{"$ref":"#/components/schemas/BlockFile"},{"$ref":"#/components/schemas/BlockGallery"},{"$ref":"#/components/schemas/BlockVideo"},{"$ref":"#/components/schemas/BlockMap"},{"$ref":"#/components/schemas/BlockServicesSummary"},{"$ref":"#/components/schemas/BlockPracticalInfo"},{"$ref":"#/components/schemas/BlockPageBreak"},{"$ref":"#/components/schemas/BlockForm"},{"$ref":"#/components/schemas/BlockPrice"},{"$ref":"#/components/schemas/BlockItinerary"},{"$ref":"#/components/schemas/BlockItineraryDay"}],"discriminator":{"propertyName":"type","mapping":{"accomodation":"#/components/schemas/BlockAccommodation","flight":"#/components/schemas/BlockFlight","activity":"#/components/schemas/BlockActivity","food":"#/components/schemas/BlockFood","transport":"#/components/schemas/BlockTransport","train":"#/components/schemas/BlockTrain","cruise":"#/components/schemas/BlockCruise","info":"#/components/schemas/BlockInfo","text":"#/components/schemas/BlockText","title":"#/components/schemas/BlockTitle","box":"#/components/schemas/BlockBox","dropdown":"#/components/schemas/BlockDropdown","group":"#/components/schemas/BlockGroup","file":"#/components/schemas/BlockFile","gallery":"#/components/schemas/BlockGallery","video":"#/components/schemas/BlockVideo","map":"#/components/schemas/BlockMap","servicesSummary":"#/components/schemas/BlockServicesSummary","practicalInfo":"#/components/schemas/BlockPracticalInfo","pageBreak":"#/components/schemas/BlockPageBreak","form":"#/components/schemas/BlockForm","price":"#/components/schemas/BlockPrice","itinerary":"#/components/schemas/BlockItinerary","itineraryDay":"#/components/schemas/BlockItineraryDay"}}}},"components/schemas/BlockAccommodation":{"id":"components/schemas/BlockAccommodation","kind":"json-schema","title":"BlockAccommodation","data":{"type":"object","description":"Accommodation block (hotel, hostel, apartment, etc.)","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-hotel-123"},"type":{"type":"string","enum":["accomodation"],"example":"accomodation"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Hotel Paris Plaza"},"location":{"type":"string","description":"Free-text address or place name for this service. Shown to the traveler and used as the map pin label when coordinates (or a googlePlaceId) are provided.","example":"123 Rue de la Paix, 75002 Paris, France"},"lat":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Latitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":48.8686},"lon":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Longitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":2.3294},"displayName":{"type":"string","description":"Human-readable place name (typically returned by Google Places). Optional.","example":"Hôtel Ritz Paris"},"formattedAddress":{"type":"string","description":"Formatted postal address. Optional.","example":"15 Place Vendôme, 75001 Paris, France"},"googlePlaceId":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Optional Google Places ID identifying this location. When a block is saved with a new or changed ID and no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lat"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lon"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", MOGU fills coordinates, address, photos, rating and contact info, and renders an accurate map pin (see "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"PUT /trips/{tripId}/config"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). Obtain one via the Google Places API — see https://developers.google.com/maps/documentation/places/web-service/place-id"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"ChIJN1blFLsV44cRga5d4gjV62Q"},"startDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-15T00:00:00Z"},"finishDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-22T00:00:00Z"},"nights":{"type":"integer","nullable":true,"example":7},"roomType":{"type":"string","enum":["Single","Double","Triple","Quad","Suite"],"nullable":true,"example":"Double"},"stayRegime":{"type":"string","enum":["AccommodationOnly","BedAndBreakfast","HalfPension","FullPension","AllIncluded"],"nullable":true,"example":"BedAndBreakfast"},"description":{"type":"string","example":"4-star hotel in the heart of Paris"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/hotel.jpg"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"}}}},"optional":{"type":"boolean","description":"Whether this service is optional for the traveler. Optional services are shown as add-ons that travelers can choose to include or exclude.","example":false}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockActivity":{"id":"components/schemas/BlockActivity","kind":"json-schema","title":"BlockActivity","data":{"type":"object","description":"Activity block (tour, excursion, experience, etc.)","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-activity-456"},"type":{"type":"string","enum":["activity"],"example":"activity"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Eiffel Tower Visit"},"location":{"type":"string","description":"Free-text address or place name for this service. Shown to the traveler and used as the map pin label when coordinates (or a googlePlaceId) are provided.","example":"Champ de Mars, Paris"},"lat":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Latitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":48.8584},"lon":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Longitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":2.2945},"displayName":{"type":"string","description":"Human-readable place name (typically returned by Google Places). Optional.","example":"Eiffel Tower"},"formattedAddress":{"type":"string","description":"Formatted postal address. Optional.","example":"Champ de Mars, 5 Av. Anatole France, 75007 Paris, France"},"googlePlaceId":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Optional Google Places ID identifying this location. When a block is saved with a new or changed ID and no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lat"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lon"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", MOGU fills coordinates, address, photos, rating and contact info, and renders an accurate map pin (see "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"PUT /trips/{tripId}/config"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). Obtain one via the Google Places API — see https://developers.google.com/maps/documentation/places/web-service/place-id"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"ChIJLU7jZClu5kcR4PcOOO6p3I0"},"startDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-16T10:00:00Z"},"startTime":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-16T10:00:00Z"},"description":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"HTML content is sanitized before rendering (no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"img","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"; style is restricted)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"Skip-the-line ticket to the Eiffel Tower"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/eiffel.jpg"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"}}}},"optional":{"type":"boolean","description":"Whether this service is optional for the traveler. Optional services are shown as add-ons that travelers can choose to include or exclude.","example":true}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockFlight":{"id":"components/schemas/BlockFlight","kind":"json-schema","title":"BlockFlight","data":{"type":"object","description":"Flight block with departure and arrival details","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-flight-789"},"type":{"type":"string","enum":["flight"],"example":"flight"},"content":{"type":"object","required":["flightNumber","departureDateTime","arrivalDateTime","departureAirport","arrivalAirport","airline","elapsedTime"],"properties":{"flightNumber":{"type":"string","example":"AF123"},"departureDateTime":{"type":"string","format":"date-time","example":"2025-07-15T08:00:00Z"},"arrivalDateTime":{"type":"string","format":"date-time","example":"2025-07-15T10:30:00Z"},"departureAirport":{"type":"object","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Departure airport details. Flights identify origin/destination with structured airport objects (keyed by IATA code) rather than the free-text "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"location"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" used by other service blocks. Use IATA codes (e.g. 'CDG', 'JFK') in the iata field; the other fields are for display."},"children":[],"type":"text"}],"type":"paragraph"}],"properties":{"iata":{"type":"string","description":"IATA airport code","example":"CDG"},"name":{"type":"string","description":"Airport full name","example":"Charles de Gaulle Airport"},"city":{"type":"string","description":"City the airport serves (display only)","example":"Paris"},"country":{"type":"string","description":"Country the airport is in (display only)","example":"France"}}},"arrivalAirport":{"type":"object","description":"Arrival airport details. Same shape as departureAirport. Use IATA codes (e.g. 'CDG', 'JFK') in the iata field; the other fields are for display.","properties":{"iata":{"type":"string","description":"IATA airport code","example":"JFK"},"name":{"type":"string","description":"Airport full name","example":"John F. Kennedy International Airport"},"city":{"type":"string","description":"City the airport serves (display only)","example":"New York"},"country":{"type":"string","description":"Country the airport is in (display only)","example":"United States"}}},"airline":{"type":"object","description":"Airline details. Use IATA code (e.g. 'AF', 'IB') in the iata field.","properties":{"iata":{"type":"string","description":"IATA airline code","example":"AF"},"name":{"type":"string","description":"Airline display name","example":"Air France"},"logo":{"type":"string","description":"URL to the airline logo image","example":"https://example.com/af-logo.png"}}},"elapsedTime":{"type":"integer","description":"Flight duration in minutes","example":150}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockText":{"id":"components/schemas/BlockText","kind":"json-schema","title":"BlockText","data":{"type":"object","description":"Rich text content block","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-text-111"},"type":{"type":"string","enum":["text"],"example":"text"},"content":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"HTML-formatted rich text. Sanitized before rendering (no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"img","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"; style restricted to text-align). See the canonical allowlist in the introduction."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"<p>Welcome to your Paris adventure!</p>"}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockPrice":{"id":"components/schemas/BlockPrice","kind":"json-schema","title":"BlockPrice","data":{"type":"object","description":"Price option block","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-price-222"},"type":{"type":"string","enum":["price"],"example":"price"},"content":{"type":"object","required":["title","price","currency"],"properties":{"title":{"type":"string","description":"Label shown for this price option.","example":"Standard Package"},"price":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Price amount in major currency units (e.g. 1500.00 = €1,500.00)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":1500},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"EUR"},"description":{"type":"string","example":"Includes hotel and breakfast"},"seats":{"type":"integer","nullable":true,"description":"Maximum number of travelers who can pick this option. Ignored when noSeatLimits is true.","example":10},"noSeatLimits":{"type":"boolean","description":"When true, the option has unlimited availability and seats is ignored.","example":false},"fullPayment":{"type":"boolean","description":"Whether this price option represents full payment (vs. a partial payment)","example":true},"default":{"type":"boolean","description":"When true, this option is pre-selected for the traveler.","example":true}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockFood":{"id":"components/schemas/BlockFood","kind":"json-schema","title":"BlockFood","data":{"type":"object","description":"Food/restaurant block","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-food-123"},"type":{"type":"string","enum":["food"],"example":"food"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Restaurant Le Petit Bistro"},"location":{"type":"string","description":"Free-text address or place name for this service. Shown to the traveler and used as the map pin label when coordinates (or a googlePlaceId) are provided.","example":"15 Rue de Rivoli, 75001 Paris, France"},"lat":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Latitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":48.8588},"lon":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Longitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":2.347},"displayName":{"type":"string","description":"Human-readable place name (typically returned by Google Places). Optional.","example":"Le Petit Bistro"},"formattedAddress":{"type":"string","description":"Formatted postal address. Optional.","example":"15 Rue de Rivoli, 75001 Paris, France"},"googlePlaceId":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Optional Google Places ID identifying this location. When a block is saved with a new or changed ID and no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lat"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lon"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", MOGU fills coordinates, address, photos, rating and contact info, and renders an accurate map pin (see "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"PUT /trips/{tripId}/config"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). Obtain one via the Google Places API — see https://developers.google.com/maps/documentation/places/web-service/place-id"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"ChIJD3uTd9hx5kcR1IQvGfr8dbk"},"description":{"type":"string","example":"Traditional French cuisine with Michelin-star chef"},"startDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-16T12:00:00Z"},"finishDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-16T14:00:00Z"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/restaurant.jpg"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"}}}},"optional":{"type":"boolean","description":"Whether this service is optional for the traveler. Optional services are shown as add-ons that travelers can choose to include or exclude.","example":false}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockInfo":{"id":"components/schemas/BlockInfo","kind":"json-schema","title":"BlockInfo","data":{"type":"object","description":"Information block (point of interest, general info, etc.)","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-info-123"},"type":{"type":"string","enum":["info"],"example":"info"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Louvre Museum"},"location":{"type":"string","description":"Free-text address or place name for this service. Shown to the traveler and used as the map pin label when coordinates (or a googlePlaceId) are provided.","example":"Rue de Rivoli, 75001 Paris, France"},"lat":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Latitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":48.8606},"lon":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Longitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":2.3376},"displayName":{"type":"string","description":"Human-readable place name (typically returned by Google Places). Optional.","example":"Louvre Museum"},"formattedAddress":{"type":"string","description":"Formatted postal address. Optional.","example":"Rue de Rivoli, 75001 Paris, France"},"googlePlaceId":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Optional Google Places ID identifying this location. When a block is saved with a new or changed ID and no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lat"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lon"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", MOGU fills coordinates, address, photos, rating and contact info, and renders an accurate map pin (see "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"PUT /trips/{tripId}/config"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). Obtain one via the Google Places API — see https://developers.google.com/maps/documentation/places/web-service/place-id"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"ChIJD3uTd9hx5kcR1IQvGfr8dbk"},"description":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"HTML content is sanitized before rendering (no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"img","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"; style is restricted). See the canonical allowlist in the introduction."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"The world's largest art museum"},"startDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-16T10:00:00Z"},"finishDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-16T12:00:00Z"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/place.jpg"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"}}}},"optional":{"type":"boolean","description":"Whether this service is optional for the traveler. Optional services are shown as add-ons that travelers can choose to include or exclude.","example":false}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockTransport":{"id":"components/schemas/BlockTransport","kind":"json-schema","title":"BlockTransport","data":{"type":"object","description":"Transport block (bus, car, ferry, etc.)","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-transport-123"},"type":{"type":"string","enum":["transport"],"example":"transport"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Bus Transfer Airport to Hotel"},"location":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Departure point name or address. For transport blocks "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"location"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the origin of the transfer; the destination is "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"arrivalLocation"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"Paris Charles de Gaulle Airport"},"lat":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Latitude (WGS84) of the departure point. Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":49.0097},"lon":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Longitude (WGS84) of the departure point. Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":2.5479},"displayName":{"type":"string","description":"Human-readable name of the departure point (typically from Google Places). Optional.","example":"Paris Charles de Gaulle Airport"},"formattedAddress":{"type":"string","description":"Formatted postal address of the departure point. Optional.","example":"95700 Roissy-en-France, France"},"googlePlaceId":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Optional Google Places ID for the departure point. When a block is saved with a new or changed ID and no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lat"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lon"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", MOGU fills coordinates, address, photos, rating and contact info, and renders an accurate map pin (see "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"PUT /trips/{tripId}/config"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). See https://developers.google.com/maps/documentation/places/web-service/place-id"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"ChIJ31Y1epFv5kcRsg5Kh9z0Tw0"},"description":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"HTML content is sanitized before rendering (no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"img","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"; style is restricted). See the canonical allowlist in the introduction."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"Private transfer service"},"startDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-16T10:00:00Z"},"finishDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-16T12:00:00Z"},"arrivalLocation":{"type":"string","description":"Arrival point name or address (the destination of the transfer).","example":"Hotel Paris Plaza, 123 Rue de la Paix, Paris"},"arrivalLat":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Latitude (WGS84) of the arrival point. Optional — filled on save from a new or changed arrivalGooglePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":48.8686},"arrivalLon":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Longitude (WGS84) of the arrival point. Optional — filled on save from a new or changed arrivalGooglePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":2.3294},"arrivalDisplayName":{"type":"string","description":"Human-readable name of the arrival point (typically from Google Places). Optional.","example":"Hôtel Ritz Paris"},"arrivalFormattedAddress":{"type":"string","description":"Formatted postal address of the arrival point. Optional.","example":"15 Place Vendôme, 75001 Paris, France"},"arrivalGooglePlaceId":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Optional Google Places ID for the arrival point. When a block is saved with a new or changed ID and no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"arrivalLat"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"arrivalLon"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", MOGU fills coordinates, address, photos, rating and contact info, and renders an accurate map pin (see "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"PUT /trips/{tripId}/config"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). See https://developers.google.com/maps/documentation/places/web-service/place-id"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"ChIJN1blFLsV44cRga5d4gjV62Q"},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/logo.png"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"},"logo":{"type":"boolean","description":"If true, this image represents the transport provider logo rather than a photo of the service","example":true}}}},"optional":{"type":"boolean","description":"Whether this service is optional for the traveler. Optional services are shown as add-ons that travelers can choose to include or exclude.","example":false}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockTrain":{"id":"components/schemas/BlockTrain","kind":"json-schema","title":"BlockTrain","data":{"type":"object","description":"Train block with departure and arrival stations","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-train-123"},"type":{"type":"string","enum":["train"],"example":"train"},"content":{"type":"object","required":["title","location","arrivalLocation"],"properties":{"title":{"type":"string","example":"AVE Madrid - Barcelona"},"location":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Departure station. Required. Note: for train blocks "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"location"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the origin station (not a single \"place this service is at\" as in accommodation/activity/food/info) and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"arrivalLocation"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the destination station."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"Madrid Puerta de Atocha"},"arrivalLocation":{"type":"string","description":"Arrival (destination) station. Required.","example":"Barcelona Sants"},"description":{"type":"string","example":"High-speed train, 2h30m"},"startDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-15T08:00:00Z"},"finishDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-15T10:30:00Z"},"operator":{"type":"object","description":"Train operator details. The name is free text (e.g. 'Renfe', 'SNCF', 'Trenitalia'). logoUrl is optional and can be any valid image URL.","properties":{"name":{"type":"string","description":"Operator display name","example":"Renfe"},"logoUrl":{"type":"string","format":"uri","description":"URL to the operator logo image","example":"https://example.com/renfe-logo.png"}}},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/operator-logo.png"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"},"logo":{"type":"boolean","description":"If true, this image represents the train operator logo rather than a photo of the service","example":true}}}},"optional":{"type":"boolean","description":"Whether this service is optional for the traveler. Optional services are shown as add-ons that travelers can choose to include or exclude.","example":false}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockCruise":{"id":"components/schemas/BlockCruise","kind":"json-schema","title":"BlockCruise","data":{"type":"object","description":"Cruise block with ship and company details","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-cruise-123"},"type":{"type":"string","enum":["cruise"],"example":"cruise"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Mediterranean Cruise"},"location":{"type":"string","description":"Free-text address or place name for this service (typically the embarkation port). Shown to the traveler and used as the map pin label when coordinates (or a googlePlaceId) are provided.","example":"Port of Barcelona"},"lat":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Latitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":41.3505},"lon":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Longitude (WGS84). Optional — filled on save from a new or changed googlePlaceId when omitted (see PUT /trips/{tripId}/config)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":2.17},"displayName":{"type":"string","description":"Human-readable place name (typically returned by Google Places). Optional.","example":"Port of Barcelona"},"formattedAddress":{"type":"string","description":"Formatted postal address. Optional.","example":"Moll de Barcelona, 08039 Barcelona, Spain"},"googlePlaceId":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Optional Google Places ID identifying this location. When a block is saved with a new or changed ID and no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lat"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lon"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", MOGU fills coordinates, address, photos, rating and contact info, and renders an accurate map pin (see "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"PUT /trips/{tripId}/config"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). Obtain one via the Google Places API — see https://developers.google.com/maps/documentation/places/web-service/place-id"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"ChIJ5TCOcRaYpBIRCmZHTz37sEQ"},"description":{"type":"string","example":"7-night Western Mediterranean cruise"},"startDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-20T00:00:00Z"},"finishDate":{"type":"string","format":"date-time","nullable":true,"example":"2025-07-27T00:00:00Z"},"ship":{"type":"object","description":"Ship and cruise company details","properties":{"name":{"type":"string","description":"Ship name","example":"MSC Grandiosa"},"company":{"type":"string","description":"Cruise company name","example":"MSC Cruceros"},"logoUrl":{"type":"string","format":"uri","description":"URL to the cruise company logo image","example":"https://example.com/msc-logo.png"},"shipImage":{"type":"string","format":"uri","description":"URL to the ship photo","example":"https://example.com/grandiosa.jpg"},"description":{"type":"object","additionalProperties":{"type":"string"},"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Localized ship descriptions keyed by ISO 639-1 language code (e.g. { \"en\": \"...\", \"es\": \"...\" })"},"children":[],"type":"text"}],"type":"paragraph"}]}}},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/ship.jpg"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"},"ship":{"type":"boolean","description":"If true, this image is the ship's official photo rather than a generic cruise image","example":true}}}},"optional":{"type":"boolean","description":"Whether this service is optional for the traveler. Optional services are shown as add-ons that travelers can choose to include or exclude.","example":false}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockItinerary":{"id":"components/schemas/BlockItinerary","kind":"json-schema","title":"BlockItinerary","data":{"type":"object","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Itinerary container block. Contains multiple "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"itineraryDay"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" blocks as children,"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"each representing a day of the trip."},"children":[],"type":"text"}],"type":"paragraph"}],"required":["id","type","content","children"],"properties":{"id":{"type":"string","example":"block-itinerary-001"},"type":{"type":"string","enum":["itinerary"],"example":"itinerary"},"content":{"type":"object","description":"Display preferences for the itinerary","properties":{"selectedDay":{"type":"integer","minimum":0,"default":0,"description":"Default selected day index (0-based)","example":0},"date":{"type":"string","format":"date-time","nullable":true,"description":"Start date/time of the itinerary (optional)","example":"2025-07-15T00:00:00Z"},"showDates":{"type":"boolean","description":"Whether to display dates for each day","example":true},"showMap":{"type":"boolean","description":"Whether to display a map with locations","example":true},"showRestOfTrip":{"type":"boolean","description":"Whether to display items outside itinerary days","example":false},"design":{"type":"string","enum":["tabs","dropdowns"],"default":"tabs","description":"Visual layout design","example":"tabs"},"designOptions":{"type":"string","enum":["expandedAll","expandedFirst","collapsedAll"],"nullable":true,"description":"Additional design options","example":"expandedFirst"}}},"children":{"type":"array","description":"Array of itineraryDay blocks, one per day","items":{"$ref":"#/components/schemas/BlockItineraryDay"}},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockItineraryDay":{"id":"components/schemas/BlockItineraryDay","kind":"json-schema","title":"BlockItineraryDay","data":{"type":"object","description":"Represents a single day within an itinerary. Contains any blocks as children,\ntypically service blocks and rich text.\n","required":["id","type","content","children"],"properties":{"id":{"type":"string","example":"block-day-1"},"type":{"type":"string","enum":["itineraryDay"],"example":"itineraryDay"},"content":{"type":"object","properties":{"title":{"type":"string","description":"Title for this day","example":"Day 1 - Arrival"},"description":{"type":"string","description":"Description or summary of the day","example":"Flight from Madrid, check-in at hotel, free evening"},"images":{"type":"array","description":"Optional images for the day","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://example.com/day-1.jpg"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"}}}}}},"children":{"type":"array","description":"Blocks for this day","items":{"$ref":"#/components/schemas/Block"}},"parent":{"type":"string","description":"ID of the parent itinerary block","example":"block-itinerary-001"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockGallery":{"id":"components/schemas/BlockGallery","kind":"json-schema","title":"BlockGallery","data":{"type":"object","description":"Image gallery block","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-gallery-123"},"type":{"type":"string","enum":["gallery"],"example":"gallery"},"content":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/photo1.jpg"},"display":{"type":"string","enum":["cover","contain"],"description":"How the image fills its container. 'cover' crops to fill the frame (default), 'contain' fits the full image.","example":"cover"}}}},"imageDisplay":{"type":"string","enum":["cover","contain"],"description":"Default display mode for all images","example":"cover"}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockTitle":{"id":"components/schemas/BlockTitle","kind":"json-schema","title":"BlockTitle","data":{"type":"object","description":"Section title block with optional anchor link","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-title-123"},"type":{"type":"string","enum":["title"],"example":"title"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Day 1 - Arrival"},"anchor":{"type":"boolean","description":"Whether this title creates a navigation anchor","example":true},"anchorLink":{"type":"string","nullable":true,"description":"Anchor link identifier (auto-set to title value)","example":"Day 1 - Arrival"}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockServicesSummary":{"id":"components/schemas/BlockServicesSummary","kind":"json-schema","title":"BlockServicesSummary","data":{"type":"object","description":"Summary block showing what is included and not included in the trip","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-summary-123"},"type":{"type":"string","enum":["servicesSummary"],"example":"servicesSummary"},"content":{"type":"object","properties":{"included":{"type":"boolean","description":"Whether to show the included section","example":true},"notIncluded":{"type":"boolean","description":"Whether to show the not-included section","example":true},"includedText":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"HTML content listing included services HTML is sanitized before rendering (no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"img","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"; style is restricted)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"<ul><li>Hotel 7 nights</li><li>All transfers</li></ul>"},"notIncludedText":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"HTML content listing not-included services HTML is sanitized before rendering (no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"img","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"; style is restricted)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"<ul><li>Travel insurance</li><li>Personal expenses</li></ul>"}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockDropdown":{"id":"components/schemas/BlockDropdown","kind":"json-schema","title":"BlockDropdown","data":{"type":"object","description":"Collapsible dropdown block that can contain child blocks","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-dropdown-123"},"type":{"type":"string","enum":["dropdown"],"example":"dropdown"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Important Information"},"text":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Optional HTML content HTML is sanitized before rendering (no "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"img","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"; style is restricted)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"<p>Please read the following details...</p>"},"open":{"type":"boolean","description":"Whether the dropdown is open by default","example":false}}},"children":{"type":"array","description":"Child blocks displayed when dropdown is expanded","items":{"$ref":"#/components/schemas/Block"}},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockBox":{"id":"components/schemas/BlockBox","kind":"json-schema","title":"BlockBox","data":{"type":"object","description":"Colored box container block","required":["id","type","content"],"properties":{"id":{"type":"string","example":"block-box-123"},"type":{"type":"string","enum":["box"],"example":"box"},"content":{"type":"object","required":["color"],"properties":{"title":{"type":"string","example":"Tip"},"description":{"type":"string","example":"Remember to bring sunscreen"},"color":{"type":"string","description":"CSS color for the box background","example":"#FFF3CD"}}},"children":{"type":"array","description":"Child blocks inside the box","items":{"$ref":"#/components/schemas/Block"}},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockGroup":{"id":"components/schemas/BlockGroup","kind":"json-schema","title":"BlockGroup","data":{"type":"object","description":"Group/container block","required":["id","type","content"],"properties":{"id":{"type":"string","description":"Unique block identifier within TripConfig.blocks","example":"block-group-1"},"type":{"type":"string","enum":["group"],"example":"group"},"content":{"type":"object","description":"Group blocks do not have content fields","additionalProperties":false,"example":{}},"children":{"type":"array","items":{"$ref":"#/components/schemas/Block"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockFile":{"id":"components/schemas/BlockFile","kind":"json-schema","title":"BlockFile","data":{"type":"object","description":"File attachment block","required":["id","type","content"],"properties":{"id":{"type":"string","description":"Unique block identifier within TripConfig.blocks","example":"block-file-1"},"type":{"type":"string","enum":["file"],"example":"file"},"content":{"type":"object","required":["fileName","fileUrl"],"properties":{"fileName":{"type":"string","minLength":1,"nullable":true,"description":"Display name shown for the download link.","example":"terms.pdf"},"fileUrl":{"type":"string","format":"uri","nullable":true,"description":"Publicly reachable URL of the file to attach.","example":"https://example.com/terms.pdf"}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockMap":{"id":"components/schemas/BlockMap","kind":"json-schema","title":"BlockMap","data":{"type":"object","description":"Embedded map block","required":["id","type","content"],"properties":{"id":{"type":"string","description":"Unique block identifier within TripConfig.blocks","example":"block-map-1"},"type":{"type":"string","enum":["map"],"example":"map"},"content":{"type":"object","required":["mapUrl"],"properties":{"mapUrl":{"type":"string","format":"uri","description":"Google Maps URL. Must be a valid URL and pass server-side validation (contains 'google' and '/maps'). Recommended format: /maps/d/viewer","example":"https://www.google.com/maps/d/viewer?mid=123ABC"}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockVideo":{"id":"components/schemas/BlockVideo","kind":"json-schema","title":"BlockVideo","data":{"type":"object","description":"Embedded video block","required":["id","type","content"],"properties":{"id":{"type":"string","description":"Unique block identifier within TripConfig.blocks","example":"block-video-1"},"type":{"type":"string","enum":["video"],"example":"video"},"content":{"type":"object","required":["videoUrl"],"properties":{"videoUrl":{"type":"string","format":"uri","description":"YouTube or Vimeo URL","example":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockPracticalInfo":{"id":"components/schemas/BlockPracticalInfo","kind":"json-schema","title":"BlockPracticalInfo","data":{"type":"object","description":"Practical information block","required":["id","type","content"],"properties":{"id":{"type":"string","description":"Unique block identifier within TripConfig.blocks","example":"block-practical-1"},"type":{"type":"string","enum":["practicalInfo"],"example":"practicalInfo"},"content":{"type":"object","required":["selectedCountry","selectedLanguage","flag"],"properties":{"selectedCountry":{"type":"string","description":"ISO 3166-1 alpha-2 country code whose practical info (visa, currency, etc.) is shown.","example":"ES"},"selectedLanguage":{"type":"string","description":"ISO 639-1 language code the practical info is rendered in.","example":"es"},"flag":{"type":"string","format":"uri","description":"URL of the country flag image displayed in the block header.","example":"https://example.com/flags/es.png"}}},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockPageBreak":{"id":"components/schemas/BlockPageBreak","kind":"json-schema","title":"BlockPageBreak","data":{"type":"object","description":"Page break block (PDF rendering)","required":["id","type"],"properties":{"id":{"type":"string","description":"Unique block identifier within TripConfig.blocks","example":"block-page-break-1"},"type":{"type":"string","enum":["pageBreak"],"example":"pageBreak"},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/BlockForm":{"id":"components/schemas/BlockForm","kind":"json-schema","title":"BlockForm","data":{"type":"object","description":"Form block (questionnaire)","required":["id","type","content"],"properties":{"id":{"type":"string","description":"Unique block identifier within TripConfig.blocks","example":"block-form-1"},"type":{"type":"string","enum":["form"],"example":"form"},"content":{"$ref":"#/components/schemas/FormContent"},"children":{"type":"array","items":{"type":"object"},"example":[]},"parent":{"type":"string","example":"parent-block-id"},"hidden":{"type":"boolean","example":false}}}},"components/schemas/TripContact":{"id":"components/schemas/TripContact","kind":"json-schema","title":"TripContact","data":{"type":"object","description":"Contact information displayed on the trip","properties":{"address":{"type":"string","maxLength":255,"example":"123 Main Street, Paris, France"},"agencyName":{"type":"string","maxLength":128,"example":"Travel Dreams Agency"},"agentName":{"type":"string","maxLength":128,"example":"John Doe"},"description":{"type":"string","maxLength":5000,"example":"Expert travel agent specializing in European tours"},"email":{"type":"string","format":"email","example":"contact@travelagency.com"},"phoneNumber":{"type":"string","maxLength":50,"example":"+33 1 23 45 67 89"},"pictureUrl":{"type":"string","format":"uri","example":"https://example.com/agent-photo.jpg"},"type":{"type":"string","description":"Type of contact","enum":["agency","agent"],"example":"agency"},"visible":{"type":"boolean","description":"Whether contact info is visible on the trip","example":true},"web":{"type":"string","format":"uri","example":"https://travelagency.com"}}}},"components/schemas/TripSettings":{"id":"components/schemas/TripSettings","kind":"json-schema","title":"TripSettings","data":{"type":"object","description":"Trip settings and preferences","required":["canDownloadPdf","canCreateCopy","hasExpiration","language","startOfTheWeek","timeFormat","dateFormat","timezone","currencySymbolPosition","decimalSeparator","currency"],"properties":{"description":{"type":"string","maxLength":500,"example":"A wonderful 7-day trip to Paris"},"canDownloadPdf":{"type":"boolean","description":"Allow travelers to download trip as PDF","example":true},"canCreateCopy":{"type":"boolean","description":"Allow travelers to create a copy of the trip","example":false},"hasExpiration":{"type":"boolean","description":"Whether the trip has an expiration date","example":false},"shareOnWhatsapp":{"type":"object","description":"WhatsApp sharing configuration. When present, all three fields are required.","required":["enabled","message","phoneNumber"],"example":{"enabled":true,"message":"Check out this trip!","phoneNumber":"+33123456789"},"properties":{"enabled":{"type":"boolean","example":true},"message":{"type":"string","maxLength":255,"description":"Pre-filled message used when sharing the trip on WhatsApp","example":"Check out this trip!"},"phoneNumber":{"type":"string","maxLength":64,"example":"+33123456789"}}},"language":{"type":"string","description":"Trip language code","example":"en"},"startOfTheWeek":{"type":"string","description":"First day of the week","enum":["monday","sunday"],"example":"monday"},"timeFormat":{"type":"string","description":"Time format preference","enum":["12h","24h"],"example":"24h"},"dateFormat":{"type":"string","description":"Date format pattern","example":"DD/MM/YYYY"},"timezone":{"type":"string","maxLength":50,"description":"IANA timezone identifier. Changing it to a name that is not an IANA zone answers 400; sending the stored value back is always accepted.","example":"Europe/Paris"},"currencySymbolPosition":{"type":"string","description":"Where to display currency symbol","enum":["start","end"],"example":"end"},"decimalSeparator":{"type":"string","description":"Decimal separator character","enum":[",","."],"example":","},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code","example":"EUR"},"notificationSettings":{"$ref":"#/components/schemas/TripNotificationSettings"}}}},"components/schemas/TripTheme":{"id":"components/schemas/TripTheme","kind":"json-schema","title":"TripTheme","data":{"type":"object","description":"Visual theme and branding for the trip","properties":{"headerImage":{"type":"object","description":"Header image configuration","example":{"config":"centered"},"properties":{"config":{"type":"string","description":"Header image display mode","enum":["centered","fullSize","noImage"],"example":"centered"}}},"navigation":{"type":"string","description":"Navigation layout style","enum":["verticalLeft","verticalRight","horizontal"],"nullable":true,"default":"verticalRight","example":"verticalRight"},"logo":{"type":"string","description":"URL of the agency/brand logo","example":"https://example.com/logo.png"},"color":{"type":"string","description":"Primary brand color (hex code)","example":"#195bf5"},"font":{"type":"string","description":"Font family for the trip","enum":["Raleway","Roboto","Open Sans","Montserrat","Lato","Inter","Poppins","Nunito Sans","Playfair Display","Playpen Sans","Dosis","Ubuntu","Merriweather"],"nullable":true,"example":"Roboto"},"pdfContactPosition":{"type":"string","description":"Where to display contact info in the PDF","enum":["first_page","last_page","hidden"],"nullable":true,"default":"first_page","example":"last_page"},"themeId":{"type":"string","description":"Predefined visual theme identifier","enum":["classic","elegant","bold","minimal","btravel","halcon","catai","travelplan","specialtours","marsol","mundosenior"],"example":"classic"}}}},"components/schemas/FormContent":{"id":"components/schemas/FormContent","kind":"json-schema","title":"FormContent","data":{"type":"object","description":"Form configuration","required":["enabled","questions"],"properties":{"enabled":{"type":"boolean","default":false,"example":false},"questions":{"type":"array","items":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string","example":"q-1"},"editable":{"type":"boolean","default":true,"example":true},"default":{"type":"boolean","default":false,"example":false},"optional":{"type":"boolean","default":false,"example":false},"hidden":{"type":"boolean","example":false},"question":{"type":"string","example":"Do you have dietary restrictions?"},"type":{"type":"string","enum":["short","long","singleChoice","multipleChoice","date","file","country","checkbox","phone","email"],"example":"short"},"options":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","example":"opt-1"},"value":{"type":"string","example":"Vegetarian"}}}}}}}}}},"components/schemas/ImageFile":{"id":"components/schemas/ImageFile","kind":"json-schema","title":"ImageFile","data":{"type":"object","description":"Image file in the trip gallery","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"URL of the image","example":"https://example.com/trip-image.jpg"},"display":{"type":"string","description":"Image display mode","enum":["cover","contain"],"default":"cover","example":"cover"},"type":{"type":"string","description":"Media type","enum":["image","video"],"default":"image","example":"image"},"index":{"type":"integer","description":"Display order index","example":0}}}},"components/schemas/TripCover":{"id":"components/schemas/TripCover","kind":"json-schema","title":"TripCover","data":{"type":"object","description":"Trip cover image configuration","properties":{"enabled":{"type":"boolean","description":"Whether cover is enabled","example":true},"files":{"type":"array","description":"Cover image files","example":[],"items":{"$ref":"#/components/schemas/ImageFile"}}}}},"components/schemas/TripNotificationSettings":{"id":"components/schemas/TripNotificationSettings","kind":"json-schema","title":"TripNotificationSettings","data":{"type":"object","description":"Notification settings for the trip","properties":{"mode":{"type":"string","description":"Where trip notifications are sent. \"account\" uses the account-level configuration; \"custom\" uses the emails listed below.","enum":["account","custom"],"default":"account","example":"account"},"emails":{"type":"array","description":"Custom recipient emails (used when mode is \"custom\")","items":{"type":"string","format":"email"},"default":[],"example":["agent@travelagency.com"]},"replyToEmail":{"type":"string","format":"email","nullable":true,"description":"Reply-to address for trip notification emails","example":"reply@travelagency.com"}}}},"components/schemas/TripGiavConfig":{"id":"components/schemas/TripGiavConfig","kind":"json-schema","title":"TripGiavConfig","data":{"type":"object","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Trip-level GIAV (back-office) configuration. All fields are optional; "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"record"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" can be null to support unlinking."},"children":[],"type":"text"}],"type":"paragraph"}],"properties":{"officeId":{"type":"integer","example":1001},"agencyProviderId":{"type":"integer","example":2002},"serviceProviderId":{"type":"integer","example":3003},"recordCreationMode":{"type":"string","enum":["trip","booking","trip_no_costs"],"example":"trip"},"profitMargin":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Profit margin. The last 2 digits represent the decimals (e.g. 1250 = 12.50%)."},"children":[],"type":"text"}],"type":"paragraph"}],"example":1250},"paymentMethodCardId":{"type":"integer","example":4004},"record":{"type":"object","nullable":true,"description":"GIAV record data (stored when recordCreationMode is \"trip\"). Set to null to unlink.","required":["recordId","recordCode","officeCode"],"properties":{"recordId":{"type":"integer","example":55123},"recordCode":{"type":"string","example":"REC-55123"},"officeCode":{"type":"string","example":"OFF-01"},"agentId":{"type":"integer","example":707}}},"costBookings":{"type":"object","description":"Flat map of GIAV cost bookings (per-trip mode). Object keys are block/service identifiers.","properties":{"quoter":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CostBookingRef"}},"services":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CostBookingRef"}},"package":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CostBookingRef"}}}},"lastSyncBookingCode":{"type":"string","example":"BKG-0001"}}}},"components/schemas/CostBookingRef":{"id":"components/schemas/CostBookingRef","kind":"json-schema","title":"CostBookingRef","data":{"type":"object","description":"Reference to a GIAV cost booking","required":["giavBookingId","isTicketBooking"],"properties":{"giavBookingId":{"type":"integer","example":88012},"isTicketBooking":{"type":"boolean","example":false}}}},"components/schemas/Trip":{"id":"components/schemas/Trip","kind":"json-schema","title":"Trip","data":{"type":"object","description":"A trip entity representing a travel itinerary","required":["id","title","slug","code","agentId","accountId","template","createdAt","updatedAt","visualizations"],"properties":{"id":{"type":"integer","description":"Unique identifier for the trip","example":12345},"title":{"type":"string","maxLength":255,"description":"Title of the trip","example":"Paris Summer Vacation"},"slug":{"type":"string","maxLength":255,"description":"URL-friendly identifier for the trip","example":"paris-summer-vacation-abc123"},"joinCode":{"type":"string","maxLength":8,"description":"Code for travelers to join the trip","example":"ABC12345"},"seoDescription":{"type":"string","maxLength":255,"description":"SEO description for the trip","example":"Experience the best of Paris in this 7-day adventure"},"duration":{"type":"integer","nullable":true,"description":"Duration of the trip in days","example":7},"hasFirmBooking":{"type":"boolean","description":"Whether the trip has a firm booking, which freezes its party. Returned by the trip read and update.","example":false},"partyLock":{"type":"string","nullable":true,"enum":["trip_party_frozen","trip_party_quoted",null],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Why the party cannot be restated through "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"statedParty"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", or null when it can."},"children":[],"type":"text"}],"type":"paragraph"}],"example":null},"dateStart":{"type":"string","format":"date-time","nullable":true,"description":"Start date of the trip","example":"2025-07-15T00:00:00.000Z"},"dateFinish":{"type":"string","format":"date-time","nullable":true,"description":"End date of the trip","example":"2025-07-22T00:00:00.000Z"},"dateExpiration":{"type":"string","format":"date-time","nullable":true,"description":"Expiration date for the trip offer","example":"2025-06-30T00:00:00.000Z"},"code":{"type":"string","maxLength":12,"description":"Internal trip code","example":"TRIP-001"},"logo":{"type":"string","format":"uri","nullable":true,"description":"URL of the trip logo","example":"https://example.com/trip-logo.png"},"countries":{"type":"array","items":{"type":"string","minLength":3,"maxLength":3},"description":"ISO 3166-1 alpha-3 country codes","example":["FRA","ESP"]},"imageUrl":{"type":"string","format":"uri","nullable":true,"description":"URL of the trip cover image","example":"https://example.com/trip-cover.jpg"},"agentId":{"type":"integer","description":"ID of the agent who created the trip","example":100},"template":{"type":"boolean","description":"Whether this trip is a template","example":false},"accountId":{"type":"integer","description":"ID of the account that owns the trip","example":50},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the trip was created","example":"2025-01-15T10:30:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the trip was last updated","example":"2025-01-18T14:45:00.000Z"},"visualizations":{"type":"integer","description":"Number of times the trip has been viewed by travelers (read-only)","example":150},"travelerAges":{"type":"array","readOnly":true,"description":"Canonical search party, returned on trip detail reads. IDs are assigned by the server and retained when services reference the party.","items":{"type":"object","required":["id","age"],"properties":{"id":{"type":"string","format":"uuid","example":"1c2c38f3-e596-463e-9f62-75c7c3602770"},"age":{"type":"integer","minimum":0,"maximum":120,"example":30}}}}}}},"components/schemas/TripListItem":{"id":"components/schemas/TripListItem","kind":"json-schema","title":"TripListItem","data":{"allOf":[{"$ref":"#/components/schemas/Trip"},{"type":"object","description":"Trip item with additional agent and account details for list views","properties":{"agentName":{"type":"string","description":"First name of the agent","example":"John"},"agentSurname":{"type":"string","description":"Last name of the agent","example":"Doe"},"agentPictureUrl":{"type":"string","format":"uri","nullable":true,"description":"URL of the agent's profile picture","example":"https://example.com/agent-photo.jpg"},"accountName":{"type":"string","description":"Name of the account/agency","example":"Travel Dreams Agency"},"customer":{"type":"string","nullable":true,"description":"Customer name associated with the trip","example":"Jane Smith"},"role":{"type":"string","enum":["owner","editor","viewer"],"description":"User's role for this trip","example":"owner"},"isPublic":{"type":"boolean","description":"Whether the trip is publicly accessible","example":true}}}]}},"components/schemas/TripListResponse":{"id":"components/schemas/TripListResponse","kind":"json-schema","title":"TripListResponse","data":{"type":"object","description":"Paginated list of trips","required":["data","page","pageSize","totalCount","totalPages"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TripListItem"}},"page":{"type":"integer","description":"Current page number","example":1},"pageSize":{"type":"integer","description":"Number of items per page","example":20},"totalCount":{"type":"integer","description":"Total number of items","example":150},"totalPages":{"type":"integer","description":"Total number of pages","example":8}}}},"components/schemas/Catalog":{"id":"components/schemas/Catalog","kind":"json-schema","title":"Catalog","data":{"type":"object","description":"A catalog containing a collection of trips","required":["id","accountId","agentId","slug","title","description","pictureUrl","accountLogo","filters","createdAt","updatedAt"],"properties":{"id":{"type":"integer","description":"Unique identifier for the catalog","example":101},"accountId":{"type":"integer","description":"ID of the account that owns the catalog","example":50},"agentId":{"type":"integer","description":"ID of the agent that created the catalog","example":5403},"slug":{"type":"string","description":"Slug used in public catalog URLs","example":"european-tours"},"title":{"type":"string","description":"Title of the catalog","example":"European Tours"},"subtitle":{"type":"string","description":"Optional subtitle","example":"Spring 2026"},"description":{"type":"string","description":"Description of the catalog","example":"Collection of our best European tours"},"pictureUrl":{"type":"string","format":"uri","description":"Cover image URL for the catalog","example":"https://example.com/catalog-cover.jpg"},"accountLogo":{"type":"boolean","description":"If true, the catalog uses the account logo (logoUrl will be derived from the account)","example":true},"logoUrl":{"type":"string","format":"uri","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Catalog logo URL (used when accountLogo=false)"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://example.com/catalog-logo.png"},"filters":{"$ref":"#/components/schemas/CatalogFilters"},"sections":{"type":"array","maxItems":50,"description":"Sections that group some of the catalog trips under a title, in display order. A trip that is in no section is shown first. In the public catalog each section lists only the trips that response returns.\n","items":{"$ref":"#/components/schemas/CatalogSection"}},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the catalog was created","example":"2025-01-10T08:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the catalog was last updated","example":"2025-01-18T12:00:00.000Z"}}}},"components/schemas/CatalogSection":{"id":"components/schemas/CatalogSection","kind":"json-schema","title":"CatalogSection","data":{"type":"object","required":["id","title","tripIds"],"properties":{"id":{"type":"string","format":"uuid","description":"Identifier of the section","example":"3f2b8c1e-6d4a-4b7e-9a10-2c5d7e8f9a01"},"title":{"type":"string","minLength":1,"maxLength":80,"description":"Title of the section","example":"Asia"},"tripIds":{"type":"array","description":"Trips in the section. A trip can be in one section only. Their order is the order of the catalog trips.","items":{"type":"integer"},"example":[12345,12346]}}}},"components/schemas/CatalogCustomFieldFilter":{"id":"components/schemas/CatalogCustomFieldFilter","kind":"json-schema","title":"CatalogCustomFieldFilter","data":{"type":"object","required":["id","enabled"],"properties":{"id":{"type":"string","format":"uuid","example":"85e8ddfb-a137-458c-9eb2-c05717c1b2bb"},"enabled":{"type":"boolean","example":true}}}},"components/schemas/CatalogFilters":{"id":"components/schemas/CatalogFilters","kind":"json-schema","title":"CatalogFilters","data":{"type":"object","description":"Filter configuration for the catalog","required":["countries","month","duration"],"properties":{"countries":{"type":"boolean","description":"Whether countries filter is enabled","example":true},"month":{"type":"boolean","description":"Whether month filter is enabled","example":false},"duration":{"type":"boolean","description":"Whether duration filter is enabled","example":true},"sections":{"type":"boolean","description":"Whether the public catalog offers tabs (\"All\" and one per section) to see one section at a time, shown from two titled sections on. When missing, it is on.\n","example":true},"customFields":{"type":"array","description":"Optional custom field filters","items":{"$ref":"#/components/schemas/CatalogCustomFieldFilter"},"example":[]}}}},"components/schemas/CatalogCreate":{"id":"components/schemas/CatalogCreate","kind":"json-schema","title":"CatalogCreate","data":{"type":"object","description":"Payload to create a catalog","required":["title","description","filters","accountLogo","tripIds"],"properties":{"title":{"type":"string","example":"European Tours"},"subtitle":{"type":"string","example":"Spring 2026"},"description":{"type":"string","example":"Colección de viajes por Europa"},"filters":{"$ref":"#/components/schemas/CatalogFilters"},"accountLogo":{"type":"boolean","description":"If true, logoUrl will be ignored and the account logo will be used","example":true},"logoUrl":{"type":"string","format":"uri","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Catalog logo URL (used when accountLogo=false)"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://example.com/catalog-logo.png"},"slug":{"type":"string","description":"Optional custom slug (if not provided, it will be generated)","example":"european-tours"},"seoDescription":{"type":"string","description":"Optional SEO description","example":"Discover our best European tours"},"pictureUrl":{"type":"string","format":"uri","description":"Optional cover image URL","example":"https://example.com/catalog-cover.jpg"},"tripIds":{"type":"array","items":{"type":"integer","example":12345},"example":[12345,12346]}}}},"components/schemas/CatalogListResponse":{"id":"components/schemas/CatalogListResponse","kind":"json-schema","title":"CatalogListResponse","data":{"type":"object","description":"Paginated list of catalogs","required":["data","page","pageSize","totalCount","totalPages"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Catalog"}},"page":{"type":"integer","description":"Current page number","example":1},"pageSize":{"type":"integer","description":"Number of items per page","example":20},"totalCount":{"type":"integer","description":"Total number of items","example":25},"totalPages":{"type":"integer","description":"Total number of pages","example":2}}}},"schema_0":{"kind":"json-schema","data":{"type":"string"},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"type":"string","format":"uuid","example":"1c2c38f3-e596-463e-9f62-75c7c3602770"},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"integer","example":1},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"integer","example":20},"id":"schema_3"},"schema_4":{"kind":"json-schema","data":{"type":"string","example":"[{\"field\":\"duration\",\"operator\":\"gte\",\"value\":5}]"},"id":"schema_4"},"schema_5":{"kind":"json-schema","data":{"type":"string","example":"{\"field\":\"createdAt\",\"direction\":\"desc\"}"},"id":"schema_5"},"schema_6":{"kind":"json-schema","data":{"type":"string","example":"{\"fields\":[\"title\"],\"term\":\"Paris\"}"},"id":"schema_6"},"schema_7":{"kind":"json-schema","data":{"type":"object","required":["title"],"properties":{"title":{"type":"string","example":"Paris Summer Vacation"},"duration":{"type":"integer","example":7},"dateStart":{"type":"string","format":"date-time","example":"2025-07-15T00:00:00.000Z"},"dateFinish":{"type":"string","format":"date-time","example":"2025-07-22T00:00:00.000Z"},"countries":{"type":"array","items":{"type":"string"},"example":["FRA"]}}},"id":"schema_7"},"schema_8":{"kind":"json-schema","data":{"type":"object","required":["tripIds"],"properties":{"tripIds":{"type":"array","description":"Array of trip IDs to delete","items":{"type":"integer"},"example":[12345,12346,12347]}}},"id":"schema_8"},"schema_9":{"kind":"json-schema","data":{"type":"object","properties":{"message":{"type":"string","example":"Trips deleted successfully"},"deletedCount":{"type":"integer","example":3}}},"id":"schema_9"},"schema_10":{"kind":"json-schema","data":{"type":"integer","example":12345},"id":"schema_10"},"schema_11":{"kind":"json-schema","data":{"type":"string","enum":["true"]},"id":"schema_11"},"schema_12":{"kind":"json-schema","data":{"type":"object","properties":{"title":{"type":"string","example":"Paris Summer Vacation"},"slug":{"type":"string","maxLength":128,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The trip's public-link identifier (e.g. "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"paris-summer-2025-abc"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"). Must be unique across MOGU; a slug already in use returns 409 with "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error: slug_already_in_use"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"paris-summer-2025-abc"},"statedParty":{"type":"array","minItems":1,"description":"Replaces the trip's party with these search ages, in the same transaction as its details update. Refused with 409 once the trip has a firm booking or quotes services. Adults use age 30 when their exact age is unknown.","items":{"type":"object","required":["age"],"properties":{"age":{"type":"integer","minimum":0,"maximum":120,"example":30}}},"example":[{"age":30},{"age":30},{"age":8}]},"duration":{"type":"integer","example":7},"dateStart":{"type":"string","format":"date-time","example":"2025-07-15T00:00:00.000Z"},"dateFinish":{"type":"string","format":"date-time","example":"2025-07-22T00:00:00.000Z"}}},"id":"schema_12"},"schema_13":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"string","enum":["slug_already_in_use","trip_party_frozen","trip_party_quoted"],"example":"trip_party_frozen"},"message":{"type":"string","example":"The party cannot change once the trip has a firm booking"}}},"id":"schema_13"},"schema_14":{"kind":"json-schema","data":{"type":"object","properties":{"exclude":{"type":"string","maxLength":500,"description":"Block types to leave out of the document, comma-separated. Unknown values are ignored. Block types: text, title, box, dropdown, itinerary, accomodation, flight, train, transport, cruise, activity, food, info, gallery, video, map, file, servicesSummary, practicalInfo, price, servicesBreakdown, payment.\n","example":"price,payment"}}},"id":"schema_14"},"schema_15":{"kind":"json-schema","data":{"type":"object","properties":{"Retry-After":{"type":"integer","example":42,"description":"Seconds until the limit resets"}}},"id":"schema_15"},"schema_16":{"kind":"json-schema","data":{"type":"string","format":"uuid","example":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b"},"id":"schema_16"},"schema_17":{"kind":"json-schema","data":{"type":"object","properties":{"Location":{"type":"string","format":"uri","example":"https://storage.googleapis.com/mogu-prod-v2-customers/trip-pdfs/6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b.pdf?X-Goog-Signature=...","description":"Signed link to the PDF, valid for five minutes"}}},"id":"schema_17"},"schema_18":{"kind":"json-schema","data":{"type":"object","properties":{"message":{"type":"string","example":"Config updated"},"updatedAt":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"The trip's update time after this save, as "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"GET /trips/{tripId}"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" returns it."},"children":[],"type":"text"}],"type":"paragraph"}],"example":"2026-12-01T10:00:00.000Z"}}},"id":"schema_18"},"schema_19":{"kind":"json-schema","data":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["booking_block_not_available","form_block_not_available"],"example":"booking_block_not_available"},"message":{"type":"string","example":"The Booking block is not available for this account: it reserves through the booking engine."}}}}},"id":"schema_19"},"schema_20":{"kind":"json-schema","data":{"type":"string","example":"[]"},"id":"schema_20"},"schema_21":{"kind":"json-schema","data":{"type":"string","example":"{\"field\":\"title\",\"direction\":\"asc\"}"},"id":"schema_21"},"schema_22":{"kind":"json-schema","data":{"type":"string","example":"{\"fields\":[\"title\"],\"term\":\"Europe\"}"},"id":"schema_22"},"schema_23":{"kind":"json-schema","data":{"type":"object","required":["catalogIds"],"properties":{"catalogIds":{"type":"array","description":"Array of catalog IDs to delete","items":{"type":"integer"},"example":[101,102,103]}}},"id":"schema_23"},"schema_24":{"kind":"json-schema","data":{"type":"object","properties":{"message":{"type":"string","example":"Catalogs deleted successfully"},"deletedCount":{"type":"integer","example":3}}},"id":"schema_24"},"schema_25":{"kind":"json-schema","data":{"type":"integer","example":101},"id":"schema_25"},"schema_26":{"kind":"json-schema","data":{"type":"object","properties":{"title":{"type":"string","example":"Updated European Tours"},"description":{"type":"string","example":"Updated collection description"},"tripIds":{"type":"array","items":{"type":"integer","example":12345},"example":[12345,12346,12347]},"sections":{"type":"array","maxItems":50,"description":"Replaces the sections of the catalog. Send an empty list to remove them.","items":{"$ref":"#/components/schemas/CatalogSection"}}}},"id":"schema_26"},"schema_27":{"kind":"json-schema","data":{"type":"string","example":"european-tours"},"id":"schema_27"},"schema_28":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"string","example":"ok"}}},"id":"schema_28"}},"exampleStore":{"paths/~1trip-imports/post/requestBody/content/application~1json/examples/url":{"value":{"source":{"type":"url","url":"https://storage.example.com/itinerary.pdf"},"isTemplate":false},"key":"url","summary":"Create from URL","id":"paths/~1trip-imports/post/requestBody/content/application~1json/examples/url"},"paths/~1trip-imports/post/requestBody/content/application~1json/examples/text":{"value":{"source":{"type":"text","content":"5 day trip to Barcelona visiting Sagrada Familia, Park Güell, Gothic Quarter, beach time at Barceloneta, and paella tasting. Staying at a 4-star hotel near Las Ramblas."},"isTemplate":false},"key":"text","summary":"Create from text","id":"paths/~1trip-imports/post/requestBody/content/application~1json/examples/text"},"paths/~1trip-imports/post/requestBody/content/application~1json/examples/json":{"value":{"source":{"type":"text","content":{"destination":"Barcelona","days":5,"activities":["Sagrada Familia","Park Güell","La Rambla"],"budget":1500}},"isTemplate":false},"key":"json","summary":"Create from JSON object","id":"paths/~1trip-imports/post/requestBody/content/application~1json/examples/json"},"paths/~1trip-imports/post/requestBody/content/application~1json/examples/inline":{"value":{"source":{"type":"inline","content":"JVBERi0xLjQKJeLjz9MK...","filename":"itinerary.pdf"},"isTemplate":false},"key":"inline","summary":"Create from base64 document","id":"paths/~1trip-imports/post/requestBody/content/application~1json/examples/inline"},"paths/~1trip-imports/post/responses/202/content/application~1json/example":{"value":{"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://ai.api.moguplatform.com/trip-imports/1c2c38f3-e596-463e-9f62-75c7c3602770/status","cancel":"https://ai.api.moguplatform.com/trip-imports/1c2c38f3-e596-463e-9f62-75c7c3602770/actions/cancel"}},"id":"paths/~1trip-imports/post/responses/202/content/application~1json/example"},"paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_source":{"value":{"error":{"code":"invalid_source","message":"Source configuration is invalid"}},"key":"invalid_source","summary":"invalid_source","id":"paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_source"},"paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_url":{"value":{"error":{"code":"invalid_url","message":"Document URL is not accessible"}},"key":"invalid_url","summary":"invalid_url","id":"paths/~1trip-imports/post/responses/400/content/application~1json/examples/invalid_url"},"paths/~1trip-imports/post/responses/400/content/application~1json/examples/unsupported_format":{"value":{"error":{"code":"unsupported_format","message":"Document format not supported"}},"key":"unsupported_format","summary":"unsupported_format","id":"paths/~1trip-imports/post/responses/400/content/application~1json/examples/unsupported_format"},"paths/~1trip-imports/post/responses/401/content/application~1json/example":{"value":{"error":{"code":"invalid_api_key","message":"API key is invalid or revoked"}},"id":"paths/~1trip-imports/post/responses/401/content/application~1json/example"},"paths/~1trip-imports/post/responses/403/content/application~1json/example":{"value":{"error":{"code":"insufficient_credits","message":"Insufficient AI credits"}},"id":"paths/~1trip-imports/post/responses/403/content/application~1json/example"},"paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/processing":{"value":{"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,"isTemplate":false,"updatedAt":"2026-01-27T15:30:28Z"},"key":"processing","summary":"Job in progress","id":"paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/processing"},"paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/completed":{"value":{"jobId":"1c2c38f3-e596-463e-9f62-75c7c3602770","status":"completed","stage":"completed","publicUrl":"https://v2.app.moguplatform.com/trips/5-days-barcelona-abc123","builderUrl":"https://v2.app.moguplatform.com/builder/67890","tripId":67890,"tripSlug":"5-days-barcelona-abc123","isTemplate":false,"updatedAt":"2026-01-27T15:30:45Z"},"key":"completed","summary":"Job completed","id":"paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/completed"},"paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/error":{"value":{"jobId":"1c2c38f3-e596-463e-9f62-75c7c3602770","status":"error","stage":"generatingBlocks","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,"isTemplate":false,"error":"Could not extract trip information from document","updatedAt":"2026-01-27T15:30:35Z"},"key":"error","summary":"Job failed","id":"paths/~1trip-imports~1{publicId}~1status/get/responses/200/content/application~1json/examples/error"},"paths/~1trip-imports~1{publicId}~1status/get/responses/404/content/application~1json/example":{"value":{"error":{"code":"job_not_found","message":"Job does not exist"}},"id":"paths/~1trip-imports~1{publicId}~1status/get/responses/404/content/application~1json/example"},"paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/200/content/application~1json/example":{"value":{"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,"isTemplate":false,"updatedAt":"2026-01-27T15:30:20Z"},"id":"paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/200/content/application~1json/example"},"paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/400/content/application~1json/example":{"value":{"error":{"code":"job_not_cancelable","message":"Job is already completed or canceled"}},"id":"paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/400/content/application~1json/example"},"paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/404/content/application~1json/example":{"value":{"error":{"code":"job_not_found","message":"Job not found"}},"id":"paths/~1trip-imports~1{publicId}~1actions~1cancel/post/responses/404/content/application~1json/example"},"paths/~1trips/post/responses/201/content/application~1json/example":{"value":{"id":12345,"title":"Paris Summer Vacation","slug":"paris-summer-vacation-abc123","joinCode":"ABC12345","code":"TRIP-001","duration":7,"dateStart":"2025-07-15T00:00:00.000Z","dateFinish":"2025-07-22T00:00:00.000Z","countries":["FRA"],"agentId":100,"accountId":50,"template":false,"createdAt":"2025-01-15T10:30:00.000Z","updatedAt":"2025-01-15T10:30:00.000Z","visualizations":0},"id":"paths/~1trips/post/responses/201/content/application~1json/example"},"paths/~1trips~1{tripId}/get/responses/200/content/application~1json/example":{"value":{"id":12345,"title":"Paris Summer Vacation","slug":"paris-summer-vacation-abc123","joinCode":"ABC12345","seoDescription":"Experience the best of Paris in this 7-day adventure","code":"TRIP-001","duration":7,"dateStart":"2025-07-15T00:00:00.000Z","dateFinish":"2025-07-22T00:00:00.000Z","countries":["FRA"],"imageUrl":"https://example.com/paris-cover.jpg","agentId":100,"accountId":50,"template":false,"createdAt":"2025-01-15T10:30:00.000Z","updatedAt":"2025-01-18T14:45:00.000Z","visualizations":150},"id":"paths/~1trips~1{tripId}/get/responses/200/content/application~1json/example"},"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/202/content/application~1json/example":{"value":{"jobId":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b","status":"pending","links":{"status":"/trips/public/pdf-jobs/6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/status","file":"/trips/public/pdf-jobs/6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/file"}},"id":"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/202/content/application~1json/example"},"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/400/content/application~1json/example":{"value":{"error":{"message":"Invalid PDF job request"}},"id":"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/400/content/application~1json/example"},"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/401/content/application~1json/example":{"value":{"error":{"message":"Missing or invalid Authorization header"}},"id":"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/401/content/application~1json/example"},"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/403/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_download_disabled","message":"PDF download is disabled for this trip"}},"id":"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/403/content/application~1json/example"},"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/404/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_not_enabled","message":"PDF is not available for this account"}},"id":"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/404/content/application~1json/example"},"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/422/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_theme_unsupported","message":"PDF is not available yet for this trip's theme"}},"id":"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/422/content/application~1json/example"},"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/429/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_rate_limited","message":"Too many PDF requests for this account, try again later"}},"id":"paths/~1trips~1{tripId}~1pdf-jobs/post/responses/429/content/application~1json/example"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/running":{"value":{"jobId":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b","status":"running","stage":"rendering"},"key":"running","summary":"Rendering","id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/running"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/completed":{"value":{"jobId":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b","status":"completed","stage":null},"key":"completed","summary":"PDF ready","id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/completed"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/failed":{"value":{"jobId":"6f1c2a7e-3b4d-4e5f-8a9b-0c1d2e3f4a5b","status":"failed","stage":"rendering","error":{"code":"trip_pdf_timed_out"}},"key":"failed","summary":"Trip too long to render","id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/200/content/application~1json/examples/failed"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/404/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_job_not_found","message":"PDF job not found"}},"id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1status/get/responses/404/content/application~1json/example"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/404/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_job_not_found","message":"PDF job not found"}},"id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/404/content/application~1json/example"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/409/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_not_ready","message":"The PDF is not ready yet"}},"id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/409/content/application~1json/example"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/410/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_expired","message":"The PDF is no longer available"}},"id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/410/content/application~1json/example"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/500/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_failed","message":"The PDF could not be rendered"}},"id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/500/content/application~1json/example"},"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/504/content/application~1json/example":{"value":{"error":{"code":"trip_pdf_timed_out","message":"The PDF took too long to render"}},"id":"paths/~1trips~1public~1pdf-jobs~1{jobId}~1file/get/responses/504/content/application~1json/example"},"paths/~1catalogs/post/requestBody/content/application~1json/examples/minimal":{"value":{"title":"European Tours","description":"Colección de viajes por Europa","accountLogo":true,"filters":{"countries":false,"month":false,"duration":false},"tripIds":[]},"key":"minimal","summary":"Minimal payload","id":"paths/~1catalogs/post/requestBody/content/application~1json/examples/minimal"},"paths/~1catalogs/post/requestBody/content/application~1json/examples/customLogo":{"value":{"title":"European Tours","description":"Colección de viajes por Europa","accountLogo":false,"logoUrl":"https://example.com/catalog-logo.png","filters":{"countries":true,"month":false,"duration":true},"tripIds":[12345,12346]},"key":"customLogo","summary":"Use a custom logo URL","id":"paths/~1catalogs/post/requestBody/content/application~1json/examples/customLogo"},"paths/~1catalogs/post/responses/201/content/application~1json/example":{"value":{"id":101,"accountId":50,"agentId":5403,"slug":"european-tours","title":"European Tours","description":"Collection of our best European tours","accountLogo":false,"logoUrl":"https://example.com/catalog-logo.png","pictureUrl":"https://example.com/catalog-cover.jpg","filters":{"countries":true,"month":false,"duration":true},"createdAt":"2025-01-20T08:00:00.000Z","updatedAt":"2025-01-20T08:00:00.000Z"},"id":"paths/~1catalogs/post/responses/201/content/application~1json/example"},"paths/~1catalogs~1{id}/get/responses/200/content/application~1json/example":{"value":{"id":101,"accountId":50,"agentId":5403,"slug":"european-tours","title":"European Tours","description":"Collection of our best European tours","accountLogo":false,"logoUrl":"https://example.com/catalog-logo.png","pictureUrl":"https://example.com/catalog-cover.jpg","filters":{"countries":true,"month":false,"duration":true},"createdAt":"2025-01-10T08:00:00.000Z","updatedAt":"2025-01-18T12:00:00.000Z"},"id":"paths/~1catalogs~1{id}/get/responses/200/content/application~1json/example"}},"securitySchemeStore":{"bearerAuth":{"id":"bearerAuth","type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"MOGU API Key (format starts with ak_) or Auth0 JWT token"},"children":[],"type":"text"}],"type":"paragraph"}]},"m2mOnBehalfOf":{"id":"m2mOnBehalfOf","type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Auth0 M2M token ("},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"client_credentials"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":") used for server-to-server integrations. Must be sent together with the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" header to identify the agent the request acts on behalf of."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Scope-based access."},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" Authorization is scope-based, not per-endpoint. Any authenticated operation documented in this specification accepts an M2M token whose JWT carries the same scopes the operation would require from a user-bound API key. For example, if your M2M client is granted "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"create:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"update:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" and "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"read:trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":", it can invoke every operation documented as requiring those scopes (not only the "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"POST /trips"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" example below)."},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"The M2M client itself is authorized to operate on one or more accounts (its grant). The agent identified by "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"x-on-behalf-of"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" is the actor used for attribution and account resolution — it is not intersected with the agent's UI role. See the \"M2M on-behalf-of\" section in the documentation index for the full integration model."},"children":[],"type":"text"}],"type":"paragraph"}]}},"specVersion":"3.0.0","servers":[{"url":"/_mock/openapi","isMockServer":true,"description":"Mock server"},{"url":"https://trips.api.moguplatform.com"},{"url":"https://ai.api.moguplatform.com","description":"AI API"}],"specType":"openapi"},"options":{"mockServer":{"url":"/_mock/openapi","position":"first","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/openapi.json?download"},{"url":"/_bundle/openapi.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false,"asyncapi":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"MOGU Public API","description":"Public API for managing trips and catalogs in the MOGU platform"}},"baseSlug":"/openapi","routesMapping":{}}