AtomicNet Merchant Gate Node

The merchant-facing gate onto an AtomicNet node: submit an order, submit a book transfer, and register assets to the node, alongside the shared authentication and system health surface. Eight operations secured with OAuth 2.0 client credentials.

OpenAPI Specification

polysign-merchant-gate-openapi.json Raw ↑
{"info": {"description": "This document lists all AtomicNet Merchant Gate Node APIs for development use.", "license": {"name": "PolySign License", "url": "https://polysign.io/licenses/LICENSE-1.0"}, "title": "AtomicNet Merchant Gate Node", "version": "e2c3a7d25004060113ed412d225d18c00741b125"}, "components": {"securitySchemes": {"OAuth2": {"type": "oauth2", "description": "OAuth 2.0 with the client credentials grant flow.", "flows": {"clientCredentials": {"tokenUrl": "/v1/auth/token", "scopes": {"participant": "Grants access to participant."}}}}}, "schemas": {"Ping": {"type": "object", "properties": {"alive": {"type": "boolean"}}}, "Version": {"type": "object", "properties": {"version": {"type": "string"}, "build_time": {"type": "string"}}}, "DeepPing": {"type": "object", "properties": {"database_reachable": {"type": "boolean"}, "alive": {"type": "boolean"}}, "required": ["alive", "database_reachable"]}, "OrderRecord": {"type": "object", "properties": {"investor_id": {"type": "string", "description": "Identifier of the investor that placed the order."}, "give_quantity": {"type": "string", "description": "Quantity of the asset being offered."}, "take_asset_id": {"type": "string", "description": "Identifier of the asset to receive."}, "give_asset_id": {"type": "string", "description": "Identifier of the asset being offered."}, "take_quantity": {"type": "string", "description": "Quantity of the asset to receive."}, "expiration": {"type": "string", "description": "ISO formatted timestamp for the order expiry."}, "order_id": {"type": "string", "default": null, "nullable": true, "description": "UUID of the order. Not required to submit an order"}}, "required": ["expiration", "give_asset_id", "give_quantity", "investor_id", "take_asset_id", "take_quantity"]}, "AbcSignature": {"type": "object", "properties": {"schema_version": {"type": "integer", "default": 1, "nullable": true, "description": "Version for the message schema."}, "abc_account_id": {"type": "string", "description": "Identifier of the ABC account."}, "signature": {"type": "string", "description": "Signature of the digest."}, "digest_type": {"type": "string", "description": "The ABC digest type."}, "digest": {"type": "string", "description": "The digest to be signed."}}, "required": ["abc_account_id", "digest", "digest_type", "signature"]}, "Order": {"type": "object", "properties": {"record": {"description": "Order record.", "allOf": [{"$ref": "#/components/schemas/OrderRecord"}]}, "signature": {"default": null, "nullable": true, "description": "Signature for the associated record object. Not required to submit an order.", "allOf": [{"$ref": "#/components/schemas/AbcSignature"}]}, "escrow_auth_id": {"type": "string", "default": null, "nullable": true, "description": "UUID of the pre-approved escrow authorization."}}, "required": ["record"]}, "AssetRecord": {"type": "object", "properties": {"asset_id": {"type": "string", "description": "Identifier of the asset."}, "status": {"type": "string", "description": "The activation status of the asset."}, "precision": {"type": "integer", "description": "Asset precision."}, "book_operator_id": {"type": "string", "description": "UUID of the Book Operator to process the asset."}, "exchange_id": {"type": "string", "description": "UUID of the Exchange to process the asset."}}, "required": ["asset_id", "book_operator_id", "exchange_id", "precision", "status"], "description": "Asset record object."}, "Asset": {"type": "object", "properties": {"partner_asset_id": {"type": "string", "default": null, "nullable": true, "description": "Partner's asset ID."}, "record": {"description": "Asset record.", "allOf": [{"$ref": "#/components/schemas/AssetRecord"}]}, "signature": {"default": null, "nullable": true, "description": "Signature for the associated record object. Not required to register an asset.", "allOf": [{"$ref": "#/components/schemas/AbcSignature"}]}}, "required": ["record"]}, "AssetList": {"type": "object", "properties": {"assets": {"type": "array", "description": "The list of assets.", "items": {"$ref": "#/components/schemas/Asset"}}}, "required": ["assets"], "description": "List of asset registration object."}, "BookTransferRecord": {"type": "object", "properties": {"asset_id": {"type": "string", "description": "Identifier of the asset to transfer."}, "quantity": {"type": "string", "description": "Quantity of the asset to transfer."}, "book_transfer_id": {"type": "string", "default": null, "nullable": true, "description": "UUID of the boot transfer. Not required to submit a book transfer."}, "take_investor_id": {"type": "string", "description": "Identifier of the investor taking the asset."}, "give_investor_id": {"type": "string", "description": "Identifier of the investor giving the asset."}}, "required": ["asset_id", "give_investor_id", "quantity", "take_investor_id"]}, "BookTransfer": {"type": "object", "properties": {"record": {"description": "BookTransfer record.", "allOf": [{"$ref": "#/components/schemas/BookTransferRecord"}]}, "signature": {"default": null, "nullable": true, "description": "Signature for the associated record object. Not required to submit a book transfer.", "allOf": [{"$ref": "#/components/schemas/AbcSignature"}]}, "escrow_auth_id": {"type": "string", "default": null, "nullable": true, "description": "UUID of the pre-approved escrow authorization."}}, "required": ["record"]}}}, "security": [{"OAuth2": ["participant"]}], "paths": {"/v1/auth/token": {"post": {"tags": ["authentication"], "summary": "Get access token.", "parameters": [{"in": "header", "name": "authorization", "description": "Base64 encode the client ID and secret.", "schema": {"type": "string"}, "required": true, "example": "Basic <Base64 encoded 'client_id:secret'>"}, {"in": "header", "name": "accept", "description": "Response format.", "schema": {"type": "string"}, "example": "application/json"}, {"in": "header", "name": "cache-control", "description": "Cache or not.", "schema": {"type": "string"}, "example": "no-cache"}], "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"type": "object", "required": ["grant_type", "scope"], "properties": {"grant_type": {"description": "Grant type", "type": "string", "example": "client_credentials"}, "scope": {"description": "At least one custom scope", "type": "string", "example": "participant"}}, "example": "grant_type=client_credentials&scope=participant"}}}}, "responses": {"200": {"description": "The access token.", "content": {"application/json": {"schema": {"type": "object", "required": ["access_token", "token_type", "expires_in", "scope"], "properties": {"access_token": {"type": "string"}, "token_type": {"type": "string"}, "expires_in": {"type": "integer"}, "scope": {"type": "string"}, "refresh_token": {"type": "string"}, "id_token": {"type": "string"}}}}}}, "401": {"description": "HTTP 401 Unauthorized.", "content": {"application/json;charset=UTF-8": {"schema": {"type": "object", "required": ["error", "error_description"], "properties": {"error": {"type": "string"}, "error_description": {"type": "string"}}}}}}}}}, "/v1/system/circuit_breakers": {"get": {"summary": "Get the status of all circuit breakers on the server.", "tags": ["system"], "responses": {"200": {"description": "Map of breakers to their statuses", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/v1/system/ping": {"get": {"summary": "Basic health check.", "tags": ["system"], "responses": {"200": {"description": "System status", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Ping"}}}}}}}, "/v1/system/version": {"get": {"summary": "Get the version of the server.", "tags": ["system"], "responses": {"200": {"description": "Version", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Version"}}}}}}}, "/v1/system/deep_ping": {"get": {"summary": "Deep health check.", "tags": ["system"], "responses": {"200": {"description": "Deep system status", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeepPing"}}}}}}}, "/v1/orders/submit_order": {"put": {"summary": "Submit order to AtomicNet node.\n", "tags": ["order"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Order"}}}}, "responses": {"200": {"description": "The order.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Order"}}}}}}}, "/v1/assets/register": {"put": {"summary": "Register assets to AtomicNet node.", "tags": ["asset"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AssetList"}}}}, "responses": {"200": {"description": "Empty"}}}}, "/v1/book_transfers/submit": {"put": {"summary": "Submit book transfer to AtomicNet node.\n", "tags": ["book_transfer"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BookTransfer"}}}}, "responses": {"200": {"description": "The order.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BookTransfer"}}}}}}}}, "openapi": "3.0.3"}