{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Interface: ApiResponse<T>"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/readme"},"children":["PERS SDK - v2.3.26"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/modules"},"children":["Exports"]}," / ApiResponse"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"interface-apiresponset","__idx":0},"children":["Interface: ApiResponse<T>"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Generic API response wrapper for client-side operations"," ","Provides consistent structure for success/error handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aligns with StructuredError pattern from @explorins/pers-shared"," ","Note: PERS API endpoints return DTOs directly (not wrapped in success/data)"," ","This is for client-side consistency when apps need response wrappers"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"type-parameters","__idx":1},"children":["Type parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":2},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"properties","__idx":3},"children":["Properties"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/apiresponse#success"},"children":["success"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/apiresponse#data"},"children":["data"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/apiresponse#message"},"children":["message"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/apiresponse#error"},"children":["error"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"properties-1","__idx":4},"children":["Properties"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"success","__idx":5},"children":["success"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["success"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if the operation was successful"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in","__idx":6},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/shared/interfaces/pers-shared-lib.interfaces.ts#L32"},"children":["shared/interfaces/pers-shared-lib.interfaces.ts:32"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data","__idx":7},"children":["data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Response data (present on success)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-1","__idx":8},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/shared/interfaces/pers-shared-lib.interfaces.ts#L34"},"children":["shared/interfaces/pers-shared-lib.interfaces.ts:34"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"message","__idx":9},"children":["message"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["message"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optional success message"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-2","__idx":10},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/shared/interfaces/pers-shared-lib.interfaces.ts#L36"},"children":["shared/interfaces/pers-shared-lib.interfaces.ts:36"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error","__idx":11},"children":["error"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["error"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Object"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Structured error details (present on failure)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"type-declaration","__idx":12},"children":["Type declaration"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Error code (e.g., 'INVALID_REQUEST', 'NOT_FOUND')"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["User-friendly error message"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unknown"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Additional error context"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-3","__idx":13},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/shared/interfaces/pers-shared-lib.interfaces.ts#L38"},"children":["shared/interfaces/pers-shared-lib.interfaces.ts:38"]}]}]},"headings":[{"value":"Interface: ApiResponse<T>","id":"interface-apiresponset","depth":1},{"value":"Type parameters","id":"type-parameters","depth":2},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Properties","id":"properties","depth":3},{"value":"Properties","id":"properties-1","depth":2},{"value":"success","id":"success","depth":3},{"value":"Defined in","id":"defined-in","depth":4},{"value":"data","id":"data","depth":3},{"value":"Defined in","id":"defined-in-1","depth":4},{"value":"message","id":"message","depth":3},{"value":"Defined in","id":"defined-in-2","depth":4},{"value":"error","id":"error","depth":3},{"value":"Type declaration","id":"type-declaration","depth":4},{"value":"Defined in","id":"defined-in-3","depth":4}],"frontmatter":{"seo":{"title":"Interface: ApiResponse<T>"}},"lastModified":"2026-08-21T18:40:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-reference/interfaces/apiresponse","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}