{
    "swagger": "2.0",
    "info": {
        "description": "TIGRS Registry Client API",
        "version": "1.0.0",
        "title": "TIGRS Registry Client API"
    },
    "host": "tigrs-app-uat01.apx.com:443",
    "basePath": "/clientapi",
    "tags": [
        {
            "name": "corporateEntity",
            "description": "Corporate Entities Operations"
        },
        {
            "name": "ledger",
            "description": "Ledger Operations"
        },
        {
            "name": "subaccount",
            "description": "SubAccount Operations"
        },
        {
            "name": "system",
            "description": "System Information"
        }
    ],
    "produces": [
        "application/json"
    ],
    "paths": {
        "/api/corporateEntity": {
            "get": {
                "tags": [
                    "corporateEntity"
                ],
                "summary": "Retrieve corporate entities",
                "operationId": "getCorporateEntities",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "accountIds",
                        "in": "query",
                        "description": "Account ids: if specified, limits results to the items related to the accounts whose ids match the provided set; otherwise, all results related to any authorized account will be returned",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "multi"
                    },
                    {
                        "name": "$filter",
                        "in": "query",
                        "description": "OData-like filter expression",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "$count",
                        "in": "query",
                        "description": "Whether to include the count of records with the result",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "name": "$orderby",
                        "in": "query",
                        "description": "Comma-separated list of columns for sorting",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "$skip",
                        "in": "query",
                        "description": "Number of records to skip",
                        "required": false,
                        "type": "integer",
                        "format": "int32"
                    },
                    {
                        "name": "$top",
                        "in": "query",
                        "description": "Maximum number of records to return",
                        "required": false,
                        "type": "integer",
                        "format": "int32"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "schema": {
                            "$ref": "#/definitions/ODataEnvelopeOfCorporateEntities"
                        }
                    },
                    "400": {
                        "description": "Invalid parameter(s)",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "401": {
                        "description": "Unauthorized access",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "403": {
                        "description": "Permission denied",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "429": {
                        "description": "Server too busy or acceptable use policy violation",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "500": {
                        "description": "An unexpected error has occurred",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/api/ledger/holding": {
            "get": {
                "tags": [
                    "ledger"
                ],
                "summary": "Retrieve holdings",
                "operationId": "getHoldings",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "accountIds",
                        "in": "query",
                        "description": "Account ids: if specified, limits results to the items related to the accounts whose ids match the provided set; otherwise, all results related to any authorized account will be returned",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "multi"
                    },
                    {
                        "name": "vintageStart",
                        "in": "query",
                        "description": "Vintage start (inclusive)",
                        "required": false,
                        "type": "string",
                        "format": "date-time"
                    },
                    {
                        "name": "vintageEnd",
                        "in": "query",
                        "description": "Vintage end (exclusive)",
                        "required": false,
                        "type": "string",
                        "format": "date-time"
                    },
                    {
                        "name": "program",
                        "in": "query",
                        "description": "Program code",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "$filter",
                        "in": "query",
                        "description": "OData-like filter expression",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "$orderby",
                        "in": "query",
                        "description": "Comma-separated list of columns for sorting",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "$skip",
                        "in": "query",
                        "description": "Number of records to skip",
                        "required": false,
                        "type": "integer",
                        "format": "int32"
                    },
                    {
                        "name": "$top",
                        "in": "query",
                        "description": "Maximum number of records to return",
                        "required": false,
                        "type": "integer",
                        "format": "int32"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "schema": {
                            "$ref": "#/definitions/ODataEnvelopeWithTotalCountOfHolding"
                        }
                    },
                    "400": {
                        "description": "Invalid parameter(s)",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "401": {
                        "description": "Unauthorized access",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "403": {
                        "description": "Permission denied",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "429": {
                        "description": "Server too busy or acceptable use policy violation",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "500": {
                        "description": "An unexpected error has occurred",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/api/ledger/retire": {
            "post": {
                "tags": [
                    "ledger"
                ],
                "summary": "Initiate retirements",
                "operationId": "retireUsingPOST",
                "consumes": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "onBehalfOfAccountId",
                        "in": "query",
                        "description": "Account id for which the request is being made: defaults to the primary account id of the requester unless specified",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "in": "body",
                        "name": "requests",
                        "description": "Retire requests",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/RequestContainerOfRetireRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/ResponseContainerOfRetireResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid parameter(s)",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "401": {
                        "description": "Unauthorized access",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "403": {
                        "description": "Permission denied",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "413": {
                        "description": "Request payload is too large",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "429": {
                        "description": "Server too busy or acceptable use policy violation",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "500": {
                        "description": "An unexpected error has occurred",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/api/subaccount/{subaccountType}": {
            "post": {
                "tags": [
                    "subaccount"
                ],
                "summary": "Create subaccounts",
                "operationId": "createSubaccountsUsingPOST",
                "consumes": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "subaccountType",
                        "in": "path",
                        "description": "Subaccount type",
                        "required": true,
                        "type": "string",
                        "enum": [
                            "ACT",
                            "RET"
                        ]
                    },
                    {
                        "name": "onBehalfOfAccountId",
                        "in": "query",
                        "description": "Account id for which the request is being made: defaults to the primary account id of the requester unless specified",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "in": "body",
                        "name": "requests",
                        "description": "Subaccount create requests",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/RequestContainerOfSubaccountCreateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/ResponseContainerOfSubaccountCreateResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid parameter(s)",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "401": {
                        "description": "Unauthorized access",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "403": {
                        "description": "Permission denied",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "413": {
                        "description": "Request payload is too large",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "429": {
                        "description": "Server too busy or acceptable use policy violation",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "500": {
                        "description": "An unexpected error has occurred",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/api/system/ping": {
            "get": {
                "tags": [
                    "system"
                ],
                "summary": "Check for server health",
                "operationId": "pingUsingGET",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Pong"
                        }
                    },
                    "401": {
                        "description": "Unauthorized access",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "403": {
                        "description": "Permission denied",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "429": {
                        "description": "Server too busy or acceptable use policy violation",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    },
                    "500": {
                        "description": "An unexpected error has occurred",
                        "schema": {
                            "$ref": "#/definitions/ErrorContainer"
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        }
    },
    "securityDefinitions": {
        "JWT": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    },
    "definitions": {
        "CorporateEntities": {
            "type": "object",
            "required": [
                "accountId",
                "corporateEntityId",
                "corporateEntityName",
                "corporateId",
                "corporateIdType"
            ],
            "properties": {
                "accountId": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The account identifier"
                },
                "corporateEntityId": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The corporate entity id"
                },
                "corporateEntityName": {
                    "type": "string",
                    "description": "The corporate entity name"
                },
                "corporateId": {
                    "type": "string",
                    "description": "The corporate id"
                },
                "corporateIdType": {
                    "type": "string",
                    "description": "The corporate id type"
                }
            },
            "title": "CorporateEntities",
            "description": "Corporate entities information"
        },
        "ErrorContainer": {
            "type": "object",
            "properties": {
                "errors": {
                    "type": "array",
                    "description": "List of errors",
                    "items": {
                        "$ref": "#/definitions/ErrorItem"
                    }
                },
                "submissionId": {
                    "type": "string",
                    "description": "Submission identifier for issue investigation"
                }
            },
            "title": "ErrorContainer",
            "description": "Container for errors"
        },
        "ErrorItem": {
            "type": "object",
            "required": [
                "code",
                "message"
            ],
            "properties": {
                "code": {
                    "type": "string",
                    "description": "The error code"
                },
                "correlationId": {
                    "type": "string",
                    "description": "The correlation identifier from the input"
                },
                "field": {
                    "type": "string",
                    "description": "The field in error, if applicable"
                },
                "message": {
                    "type": "string",
                    "description": "The error message"
                },
                "parameter": {
                    "type": "string",
                    "description": "The parameter in error, if applicable"
                },
                "path": {
                    "type": "string",
                    "description": "The path to the field specifically in error, if applicable"
                }
            },
            "title": "ErrorItem",
            "description": "Describes a specific error"
        },
        "Holding": {
            "type": "object",
            "required": [
                "accountId",
                "certificateSerialNumberRange",
                "certificateStatus",
                "countryIso2Code",
                "creditType",
                "fuelTypeCode",
                "fuelTypeDescription",
                "quantity",
                "resourceName",
                "resourceProgramAssignedIdentifier",
                "retirementTypeCode",
                "retirementTypeDescription",
                "subaccountId",
                "subaccountName",
                "vintageEnd",
                "vintageStart"
            ],
            "properties": {
                "accountId": {
                    "type": "string",
                    "description": "The account identifier"
                },
                "beneficialOwner": {
                    "type": "string",
                    "description": "The beneficial owner"
                },
                "certificateSerialNumberRange": {
                    "type": "string",
                    "description": "The certificate serial number range"
                },
                "certificateStatus": {
                    "type": "string",
                    "description": "The certificate status: see documentation for possible values"
                },
                "countryIso2Code": {
                    "type": "string",
                    "description": "The country to which resource belongs as an ISO-2 code"
                },
                "creditType": {
                    "type": "string",
                    "description": "The credit type: see documentation for possible values"
                },
                "fuelTypeCode": {
                    "type": "string",
                    "description": "The fuel type code: see documentation for possible values"
                },
                "fuelTypeDescription": {
                    "type": "string",
                    "description": "The fuel type description: see documentation for possible values"
                },
                "quantity": {
                    "type": "number",
                    "description": "The holding quantity"
                },
                "resourceName": {
                    "type": "string",
                    "description": "The resource name"
                },
                "resourceProgramAssignedIdentifier": {
                    "type": "string",
                    "description": "The resource identifier"
                },
                "retireDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The retire date"
                },
                "retirementDetails": {
                    "type": "string",
                    "description": "Additional retirement details"
                },
                "retirementReasonCode": {
                    "type": "string",
                    "description": "The retirement reason code: see documentation for possible values"
                },
                "retirementReasonDescription": {
                    "type": "string",
                    "description": "The retirement reason description: see documentation for possible values"
                },
                "retirementTypeCode": {
                    "type": "string",
                    "description": "The retirement type code: see documentation for possible values"
                },
                "retirementTypeDescription": {
                    "type": "string",
                    "description": "The retirement type description: see documentation for possible values"
                },
                "subaccountId": {
                    "type": "string",
                    "description": "The subaccount identifier"
                },
                "subaccountName": {
                    "type": "string",
                    "description": "The subaccount name"
                },
                "vintageEnd": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The vintage end"
                },
                "vintageStart": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The vintage start"
                }
            },
            "title": "Holding",
            "description": "Holding information"
        },
        "ODataEnvelopeOfCorporateEntities": {
            "type": "object",
            "properties": {
                "@count": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The total number of results (only present if requested)"
                },
                "value": {
                    "type": "array",
                    "description": "Rows of information",
                    "items": {
                        "$ref": "#/definitions/CorporateEntities"
                    }
                }
            },
            "title": "ODataEnvelopeOfCorporateEntities",
            "description": "Container for OData-like rows of information"
        },
        "ODataEnvelopeWithTotalCountOfHolding": {
            "type": "object",
            "required": [
                "countExceeded",
                "value"
            ],
            "properties": {
                "@count": {
                    "type": "integer",
                    "format": "int32"
                },
                "countExceeded": {
                    "type": "boolean"
                },
                "totalCount": {
                    "type": "integer",
                    "format": "int32"
                },
                "value": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Holding"
                    }
                }
            },
            "title": "ODataEnvelopeWithTotalCountOfHolding"
        },
        "Pong": {
            "type": "object",
            "required": [
                "pong"
            ],
            "properties": {
                "pong": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The current time on the server"
                }
            },
            "title": "Pong",
            "description": "Response indicating server health"
        },
        "RequestContainerOfRetireRequest": {
            "type": "object",
            "properties": {
                "requests": {
                    "type": "array",
                    "description": "List of requests",
                    "items": {
                        "$ref": "#/definitions/RetireRequest"
                    }
                }
            },
            "title": "RequestContainerOfRetireRequest",
            "description": "Container for requests"
        },
        "RequestContainerOfSubaccountCreateRequest": {
            "type": "object",
            "properties": {
                "requests": {
                    "type": "array",
                    "description": "List of requests",
                    "items": {
                        "$ref": "#/definitions/SubaccountCreateRequest"
                    }
                }
            },
            "title": "RequestContainerOfSubaccountCreateRequest",
            "description": "Container for requests"
        },
        "ResponseContainerOfRetireResponse": {
            "type": "object",
            "required": [
                "submissionId"
            ],
            "properties": {
                "responses": {
                    "type": "array",
                    "description": "List of responses",
                    "items": {
                        "$ref": "#/definitions/RetireResponse"
                    }
                },
                "submissionId": {
                    "type": "string",
                    "description": "Submission identifier for issue investigation"
                }
            },
            "title": "ResponseContainerOfRetireResponse",
            "description": "Container for responses"
        },
        "ResponseContainerOfSubaccountCreateResponse": {
            "type": "object",
            "required": [
                "submissionId"
            ],
            "properties": {
                "responses": {
                    "type": "array",
                    "description": "List of responses",
                    "items": {
                        "$ref": "#/definitions/SubaccountCreateResponse"
                    }
                },
                "submissionId": {
                    "type": "string",
                    "description": "Submission identifier for issue investigation"
                }
            },
            "title": "ResponseContainerOfSubaccountCreateResponse",
            "description": "Container for responses"
        },
        "RetireRequest": {
            "type": "object",
            "required": [
                "certificateSerialNumberRange",
                "quantity",
                "reasonCode",
                "retirementTypeCode",
                "subaccountId",
                "year"
            ],
            "properties": {
                "certificateSerialNumberRange": {
                    "type": "string",
                    "description": "The certificate serial number range: certificate ranges as returned by the holdings call, may not be combined with other ranges, even if contiguous"
                },
                "correlationId": {
                    "type": "string",
                    "description": "Correlation identifier: an opaque value that will be returned in the responses and error messages to correlate the response or error with the corresponding request"
                },
                "details": {
                    "type": "string",
                    "description": "Additional details, may be required in some cases: see documentation for more information"
                },
                "emailNotification": {
                    "type": "string",
                    "description": "The e-mail address for notification"
                },
                "onBehalfOfCorporateEntityId": {
                    "type": "integer",
                    "format": "int32",
                    "description": "On Behalf Of Corporate Entity Id: see documentation for allowed values"
                },
                "quantity": {
                    "type": "number",
                    "description": "The quantity of the transaction"
                },
                "reasonCode": {
                    "type": "string",
                    "description": "The retire reason code: see documentation for allowed values"
                },
                "retirementCertificateType": {
                    "type": "string",
                    "description": "Retirement certificate type: see documentation for allowed values"
                },
                "retirementTypeCode": {
                    "type": "string",
                    "description": "The retirement type code: GRN, BBO, OTH"
                },
                "subaccountId": {
                    "type": "string",
                    "description": "The subaccount identifier"
                },
                "year": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The year attribute: see documentation for allowed values"
                }
            },
            "title": "RetireRequest",
            "description": "Request to retire credits"
        },
        "RetireResponse": {
            "type": "object",
            "required": [
                "certificateSerialNumberRange",
                "quantity",
                "reasonCode",
                "retirementTypeCode",
                "subaccountId",
                "transferId",
                "year"
            ],
            "properties": {
                "certificateSerialNumberRange": {
                    "type": "string",
                    "description": "The certificate serial number range: certificate ranges as returned by the holdings call, may not be combined with other ranges, even if contiguous"
                },
                "correlationId": {
                    "type": "string",
                    "description": "Correlation identifier: an opaque value that will be returned in the responses and error messages to correlate the response or error with the corresponding request"
                },
                "details": {
                    "type": "string",
                    "description": "Additional details, may be required in some cases: see documentation for more information"
                },
                "emailNotification": {
                    "type": "string",
                    "description": "The e-mail address for notification"
                },
                "onBehalfOfCorporateEntityId": {
                    "type": "integer",
                    "format": "int32",
                    "description": "On Behalf Of Corporate Entity Id: see documentation for allowed values"
                },
                "quantity": {
                    "type": "number",
                    "description": "The quantity of the transaction"
                },
                "reasonCode": {
                    "type": "string",
                    "description": "The retire reason code: see documentation for allowed values"
                },
                "retirementCertificateType": {
                    "type": "string",
                    "description": "Retirement certificate type: see documentation for allowed values"
                },
                "retirementTypeCode": {
                    "type": "string",
                    "description": "The retirement type code: GRN, BBO, OTH"
                },
                "subaccountId": {
                    "type": "string",
                    "description": "The subaccount identifier"
                },
                "transferId": {
                    "type": "string",
                    "description": "The transfer identifier"
                },
                "year": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The year attribute: see documentation for allowed values"
                }
            },
            "title": "RetireResponse",
            "description": "Response to an retire request"
        },
        "SubaccountCreateRequest": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "additionalDetails": {
                    "type": "string",
                    "description": "The subaccount additional details"
                },
                "alias": {
                    "type": "string",
                    "description": "The subaccount alias"
                },
                "correlationId": {
                    "type": "string",
                    "description": "Correlation identifier: an opaque value that will be returned in the responses and error messages to correlate the response or error with the corresponding request"
                },
                "name": {
                    "type": "string",
                    "description": "The subaccount name"
                }
            },
            "title": "SubaccountCreateRequest",
            "description": "Request to create a subaccount"
        },
        "SubaccountCreateResponse": {
            "type": "object",
            "required": [
                "name",
                "subaccountId"
            ],
            "properties": {
                "additionalDetails": {
                    "type": "string",
                    "description": "The subaccount additional details"
                },
                "alias": {
                    "type": "string",
                    "description": "The subaccount alias"
                },
                "correlationId": {
                    "type": "string",
                    "description": "Correlation identifier: an opaque value that will be returned in the responses and error messages to correlate the response or error with the corresponding request"
                },
                "name": {
                    "type": "string",
                    "description": "The subaccount name"
                },
                "subaccountId": {
                    "type": "string",
                    "description": "The subaccount identifier"
                }
            },
            "title": "SubaccountCreateResponse",
            "description": "Response to a subaccount creation request"
        }
    }
}