# Shared ## Domain Types ### API Error - `type APIError struct{…}` A direct mapping of tonic::Status, for use in HTTP responses. - `Code int64` The error code is used to identify the nature of the error. It corresponds to an HTTP status code. - `Message string` A human-readable message providing more details about the error. - `Details []map[string, any]` Additional error details, if any. This can include structured information such as field violations or error metadata. ### Base Response - `type BaseResponse struct{…}` - `Metadata ResponseMetadata` Response metadata, including the request ID and optional pagination info. - `RequestID string` A unique ID for this request, generated upon ingestion of the request. - `NextPageToken string` Base64URL-encoded pagination token containing limit and offset - `PageNumber int64` Pagination. Included if this was a GET (list) response - `PreviousPageToken string` Base64URL-encoded pagination token containing limit and offset - `TotalItems int64` Total number of items available (not just in this page). - `TotalPages int64` Total number of pages available. - `Error APIError` Structured error details when the request is unsuccessful. - `Code int64` The error code is used to identify the nature of the error. It corresponds to an HTTP status code. - `Message string` A human-readable message providing more details about the error. - `Details []map[string, any]` Additional error details, if any. This can include structured information such as field violations or error metadata. ### Response Metadata - `type ResponseMetadata struct{…}` Metadata for the response. This will always contain a request ID which can be used to identify the request to Clear Street for tracing, and optionally may include pagination data. - `RequestID string` A unique ID for this request, generated upon ingestion of the request. - `NextPageToken string` Base64URL-encoded pagination token containing limit and offset - `PageNumber int64` Pagination. Included if this was a GET (list) response - `PreviousPageToken string` Base64URL-encoded pagination token containing limit and offset - `TotalItems int64` Total number of items available (not just in this page). - `TotalPages int64` Total number of pages available.