Skip to main content
Version: 2019-05-29 (Current)

Retrieve API Schema

Retrieve the OpenAPI schema for the Omise API. This endpoint returns the complete API specification in OpenAPI 3.0 format, allowing you to discover available endpoints, understand request/response structures, and integrate with API documentation tools.


Request Parametersโ€‹

Optional - 1 fieldOptional Parameters
โ–ผ
`format`STRING(optional)
Response format for the schema. Defaults to JSON.
Example:"json"
Values:json, yaml
Default:"json"

Responsesโ€‹

200

Successful retrieval

Schema retrieved successfully. Returns the complete OpenAPI 3.0 specification.

Response structure:
  • openapi - OpenAPI specification version (e.g., "3.0.0")
  • info - API metadata including title, version, and description
  • servers - Available API server URLs
  • paths - All available API endpoints with methods and parameters
  • components - Reusable schema definitions and security schemes
  • security - Global security requirements

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Invalid format parameter value
  • Unsupported query parameters

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid API key
  • Incorrect HTTP Basic Auth format

404

Not found

The schema endpoint was not found.

Common causes:
  • Invalid endpoint URL
  • Incorrect API version

5xx

Server error

Server-side error occurred. These are rare but should be handled gracefully.

How to handle:

Code samplesโ€‹

curl https://api.omise.co/schema \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
authentication_failureInvalid API keyVerify your API key is correct
bad_requestInvalid request parametersCheck the format parameter value

Schema Structureโ€‹

FieldTypeDescription
openapistringOpenAPI specification version
infoobjectAPI metadata (title, version, description)
serversarrayAvailable API server URLs
pathsobjectAll API endpoints with operations
componentsobjectReusable schemas, parameters, and security definitions
securityarrayGlobal security requirements
tagsarrayAPI resource groupings

๐Ÿ”‘API Credentials

Try it outโ€‹

Additional - 1 fields
Your IP: ...Loading...