{"openapi":"3.0.0","info":{"title":"AAA Security","description":"APIs to perform CRUD and List operations on AuthRule, ORT, Org, User, and Group entities. Entity AuditEvents supports only List operation. Request and response payloads are JSON objects.","version":"1"},"tags":[{"name":"Users","description":"A User must have a unique username and an email address and may belong to zero or more groups. Supports extended attributes."},{"name":"Groups","description":"Groups are collection of users to facilitate enforcement of access permissions via AuthRules."},{"name":"Orgs","description":"Orgs define a hierarchical structure to represent Companies, Partners (aka Developers or Referral Accounts) and Merchant Locations."},{"name":"Org Tokens (ORTs)","description":"Non-expiring, revocable tokens issued to Org Admins. Only callers within OrgAdmins group can invoke these APIs."},{"name":"AuthRules","description":"An AuthRule object associates an API endpoint (HTTP method and URL) with clients that can invoke the API."},{"name":"AuditEvents","description":"An AuditEvent object captures creation, deletion or update of entities."}],"paths":{"/v1/users":{"get":{"tags":["Users"],"summary":"List Users","description":"Retrieves the list of users. Caller must be an OrgAdmin or StaffAdmin (ie; OrgAdmin with oid=1). By default it returns users belonging to Caller's Org. Setting query param \"fqoid\" to \"all\" returns users of caller's Org and all its descendant Orgs. To get users of a specific Org, set \"fqoid\" to the fqoid of that Org. This call supports pagniation, ordering, filtering, grouping and fuzzy/substring searches.","operationId":"ListUsers","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/usernameParam"},{"$ref":"#/components/parameters/emailParam"},{"$ref":"#/components/parameters/groupNameParam"},{"$ref":"#/components/parameters/orgNameParam"},{"$ref":"#/components/parameters/firstNameParam"},{"$ref":"#/components/parameters/lastNameParam"},{"$ref":"#/components/parameters/statusParam"},{"$ref":"#/components/parameters/addedAfterParam"},{"$ref":"#/components/parameters/addedBeforeParam"},{"$ref":"#/components/parameters/lastUpdatedAfterParam"},{"$ref":"#/components/parameters/lastUpdatedBeforeParam"},{"$ref":"#/components/parameters/pageParam"},{"$ref":"#/components/parameters/pageSizeParam"},{"$ref":"#/components/parameters/userOrderByParam"},{"$ref":"#/components/parameters/orderDirParam"},{"$ref":"#/components/parameters/userGroupByParam"},{"$ref":"#/components/parameters/userFieldsParam"},{"$ref":"#/components/parameters/ngqParam"},{"$ref":"#/components/parameters/ngtParam"}],"responses":{"200":{"description":"List of User objects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResponse"}}}}}},"post":{"tags":["Users"],"summary":"Create a User","description":"Creates a new user in AWS Cognito. Only StaffAdmins can create new users. An email with temporary password is sent to email address specified in the request body.","operationId":"CreateUser","parameters":[{"$ref":"#/components/parameters/authzHeader"}],"requestBody":{"description":"User input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}},"required":true},"responses":{"200":{"description":"User output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserResponse"}}}}}}},"/v1/users/{userid}":{"get":{"tags":["Users"],"summary":"Retrieve User","description":"Retrieves the User object identified by {userid}. {userid} could be the Cognito User id (a UUID) or username. A user can retrieve its own User object. An OrgAdmin can retrieve user object of its own and descendant Orgs.","operationId":"RetrieveUser","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/useridPathComp"}],"responses":{"200":{"description":"User output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveUserResponse"}}}},"404":{"description":"Not Found"}}},"patch":{"tags":["Users"],"summary":"Update User","description":"Updates an existing User. Fields username and cuid cannot be updated. A user can update its own User object. An OrgAdmin can update user object of its own and descendant Orgs.","operationId":"UpdateUser","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/useridPathComp"}],"requestBody":{"description":"User input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}},"required":true},"responses":{"200":{"description":"Updated User object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserResponse"}}}},"404":{"description":"Not Found"}}},"delete":{"tags":["Users"],"summary":"Delete User","description":"Remove an user. Only a StaffAdmin can perform this operation.","operationId":"DeleteUser","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/useridPathComp"}],"responses":{"204":{"description":"Item removed. No content."}}}},"/v1/groups":{"get":{"tags":["Groups"],"summary":"List Groups","description":"Retrieves the list of groups. Any user can retrieve list of Groups. Filtering, pagination, ordering, grouping etc. not supported (yet!).","operationId":"ListGroups","parameters":[{"$ref":"#/components/parameters/authzHeader"}],"responses":{"200":{"description":"List of Group objects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGroupsResponse"}}}}}},"post":{"tags":["Groups"],"summary":"Create a Group","description":"To be implemented.","operationId":"CreateGroup","parameters":[{"$ref":"#/components/parameters/authzHeader"}],"requestBody":{"description":"Group input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupRequest"}}},"required":true},"responses":{"200":{"description":"Group output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupResponse"}}}}}}},"/v1/groups/{groupName}":{"get":{"tags":["Groups"],"summary":"Retrieve Group","description":"Retrieves the Group object with name {groupName}. Any user can retrieve a group object.","operationId":"RetrieveGroup","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/groupNamePathComp"}],"responses":{"200":{"description":"Group output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveGroupResponse"}}}},"404":{"description":"Not Found"}}},"patch":{"tags":["Groups"],"summary":"Update Group","description":"Updates an existing Group. Fields that can be updated: extended attributes. Only StaffAdmins can update a group.","operationId":"UpdateGroup","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/groupNamePathComp"}],"requestBody":{"description":"ORT input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupRequest"}}},"required":true},"responses":{"200":{"description":"Updated Group object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupResponse"}}}},"404":{"description":"Not Found"}}},"delete":{"tags":["Groups"],"summary":"Delete Group","description":"Not Implemented.","operationId":"DeleteGroup","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/groupNamePathComp"}],"responses":{"204":{"description":"Item removed. No content."}}}},"/v1/orgs":{"get":{"tags":["Orgs"],"summary":"List Orgs","description":"Retrieves the list of orgs. Caller must be an OrgAdmin or StaffAdmin (ie; OrgAdmin with oid=1). By default it returns users belonging to Caller's Org. Setting query param \"fqoid\" to \"all\" returns users of caller's Org and all its descendant Orgs. To get sub-orgs of a specific Org, set \"fqoid\" to the fqoid of that Org. This call supports pagniation, ordering, filtering, grouping and fuzzy/substring searches.","operationId":"ListOrgs","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/nameParam"},{"$ref":"#/components/parameters/fqoidParam"},{"$ref":"#/components/parameters/sfidParam"},{"$ref":"#/components/parameters/otypeParam"},{"$ref":"#/components/parameters/addedAfterParam"},{"$ref":"#/components/parameters/addedBeforeParam"},{"$ref":"#/components/parameters/lastUpdatedAfterParam"},{"$ref":"#/components/parameters/lastUpdatedBeforeParam"},{"$ref":"#/components/parameters/pageParam"},{"$ref":"#/components/parameters/pageSizeParam"},{"$ref":"#/components/parameters/orgOrderByParam"},{"$ref":"#/components/parameters/orderDirParam"},{"$ref":"#/components/parameters/orgGroupByParam"},{"$ref":"#/components/parameters/orgFieldsParam"},{"$ref":"#/components/parameters/ngqParam"},{"$ref":"#/components/parameters/ngtParam"}],"responses":{"200":{"description":"List of Org objects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuditEventsResponse"}}}}}},"post":{"tags":["Orgs"],"summary":"Create an Org","description":"Creates an Org. Only StaffAdmins can create Orgs.","operationId":"CreateOrg","parameters":[{"$ref":"#/components/parameters/authzHeader"}],"requestBody":{"description":"Org input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgRequest"}}},"required":true},"responses":{"200":{"description":"Org output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgResponse"}}}}}}},"/v1/orgs/{oid}":{"get":{"tags":["Orgs"],"summary":"Retrieve Org","description":"Retrieves the Org object with id {oid}","operationId":"RetrieveOrg","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/oidPathComp"}],"responses":{"200":{"description":"Org output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveOrgResponse"}}}},"404":{"description":"Not Found"}}},"patch":{"tags":["Orgs"],"summary":"Update Org","description":"Updates an existing Org.","operationId":"UpdateOrg","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/oidPathComp"}],"requestBody":{"description":"Org input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgRequest"}}},"required":true},"responses":{"200":{"description":"Updated Group object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgResponse"}}}},"404":{"description":"Not Found"}}},"delete":{"tags":["Orgs"],"summary":"Delete Org","description":"Deletes an Org. Available only to a Staff Admin.","operationId":"DeleteOrg","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/oidPathComp"}],"responses":{"204":{"description":"Item removed. No content."}}}},"/v1/orts":{"get":{"tags":["Org Tokens (ORTs)"],"summary":"List Org Tokens","description":"Retrieves the list of accessible Org Token metadata objects. The tokens themselves are returned only at the creation time and are not stored for subsequent retrieval. Doesn't support pagination, ordering or grouping (yet!).","operationId":"ListORTs","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"name":"fqoid","in":"query","description":"Fully Qualified OID. Special value \"all\" implies all sub-orgs of the caller. By default, returns the ORTs of the caller's Org. (TBD -- replace fqoid with oid)","required":false,"style":"form","explode":false,"schema":{"type":"string"},"example":"1-1234"}],"responses":{"200":{"description":"List of ORT metadata objects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListORTsResponse"}}}}}},"post":{"tags":["Org Tokens (ORTs)"],"summary":"Create an ORT","description":"Creates a new ORT. Unless specified otherwise, the newly created ORT is belongs to the caller's Org. Mandatory name field must be unique within an Org. An OrgAdmin can create an ORT for any descendant Org by specifying the OID within the payload.","operationId":"CreateORT","parameters":[{"$ref":"#/components/parameters/authzHeader"}],"requestBody":{"description":"ORT input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateORTRequest"}}},"required":true},"responses":{"200":{"description":"ORT output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateORTResponse"}}}}}}},"/v1/orts/{tid}":{"get":{"tags":["Org Tokens (ORTs)"],"summary":"Retrieve ORT","description":"Retrieves the ORT metadata object for the given Id {tid}.","operationId":"RetrieveORT","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/tidPathComp"}],"responses":{"200":{"description":"ORT output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveORTResponse"}}}},"404":{"description":"Not Found"}}},"patch":{"tags":["Org Tokens (ORTs)"],"summary":"Update ORT","description":"Updates the ORT metadata object with Id {tid}. This call can be used to change the name, notes and state. Changing the state from \"A\" (Active) to \"I\" (Inactive) deactivates the token. At least one of the input fields must be specified.","operationId":"UpdateORT","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/tidPathComp"}],"requestBody":{"description":"ORT input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateORTRequest"}}},"required":true},"responses":{"200":{"description":"ORT object updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateORTResponse"}}}},"404":{"description":"Not Found"}}},"delete":{"tags":["Org Tokens (ORTs)"],"summary":"Delete ORT","description":"Delete the ORT identified by {tid}.","operationId":"DeleteORT","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/tidPathComp"}],"responses":{"204":{"description":"Item removed. No content."},"404":{"description":"Not Found"}}}},"/v1/authrules":{"get":{"tags":["AuthRules"],"summary":"List AuthRules","description":"Retrieves the list of matching AuthRule objects. Matching criteria is specified via query string parameters: method, urlPattern, urlPatternSubStr, component, authTokenType and groupName. A paramter may not be repeated (the last one wins in case of repetition). Note: The result doesn't support pagination.","operationId":"ListAuthRules","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"name":"method","in":"query","description":"HTTP verb (GET, POST, PUT, PATCH or DELETE) of the API. Any string value is allowed.","required":false,"style":"form","explode":false,"schema":{"type":"string"},"example":"POST"},{"name":"urlPattern","in":"query","description":"Expression for the API URL.","required":false,"style":"form","explode":false,"schema":{"type":"string"},"example":"^users/*$"},{"name":"urlPatternSubStr","in":"query","description":"A substring within URL Patterns.","required":false,"style":"form","explode":false,"schema":{"type":"string"},"example":"users"},{"name":"component","in":"query","description":"A descriptive name to group APIs.","required":false,"style":"form","explode":false,"schema":{"type":"string"},"example":"vt-configuration"},{"name":"authTokenType","in":"query","description":"Token type. Possible values are IDT and ORT","required":false,"style":"form","explode":false,"schema":{"type":"string"},"example":"IDT"},{"name":"groupName","in":"query","description":"Authorization group. Examples include StaffAdmins, StaffUsers, ...","required":false,"style":"form","explode":false,"schema":{"type":"string"},"example":"StaffAdmins"}],"responses":{"200":{"description":"List of AuthRule objects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuthRulesResponse"}}}}},"deprecated":false},"post":{"tags":["AuthRules"],"summary":"Create AuthRule","description":"Creates a new AuthRule. The combination of method, urlPattern and component must be unique.","operationId":"CreateAuthRule","parameters":[{"$ref":"#/components/parameters/authzHeader"}],"requestBody":{"description":"AuthRule input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuthRuleRequest"}}},"required":true},"responses":{"201":{"description":"AuthRule object created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuthRuleResponse"}}}}}}},"/v1/authrules/{arid}":{"get":{"tags":["AuthRules"],"summary":"Retrieve AuthRule","description":"Retrieves the AuthRule object with Id {arid}","operationId":"RetrieveAuthRule","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/aridPathComp"}],"responses":{"200":{"description":"AuthRule output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveAuthRuleResponse"}}}},"404":{"description":"Not Found"}}},"patch":{"tags":["AuthRules"],"summary":"Update AuthRule","description":"Updates the AuthRule object with Id {arid} with the attributes specified in the body. One or more attributes may be specified in the request payload.","operationId":"UpdateAuthRule","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/aridPathComp"}],"requestBody":{"description":"AuthRule input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAuthRuleRequest"}}},"required":true},"responses":{"200":{"description":"AuthRule output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAuthRuleResponse"}}}},"404":{"description":"Not Found"}}},"delete":{"tags":["AuthRules"],"summary":"Delete an AuthRule","description":"Delete the AuthRule identified by arid.","operationId":"DeleteAuthRule","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/aridPathComp"}],"responses":{"204":{"description":"Item removed. No content."},"404":{"description":"Not Found"}}}},"/v1/auditevents":{"get":{"tags":["AuditEvents"],"summary":"List AuditEvents","description":"Retrieves the list of audit events. Caller must be an OrgAdmin or StaffAdmin (ie; OrgAdmin with oid=1). By default it returns events belonging to Caller's Org. Setting query param \"fqoid\" to \"all\" returns events of caller's Org and all its descendant Orgs. To get events belonging to a specific Org, set \"fqoid\" to the fqoid of that Org. This call supports pagniation, ordering and filtering.","operationId":"ListAuditEvents","parameters":[{"$ref":"#/components/parameters/authzHeader"},{"$ref":"#/components/parameters/opParam"},{"$ref":"#/components/parameters/subTypeParam"},{"$ref":"#/components/parameters/subIdParam"},{"$ref":"#/components/parameters/entityTypeParam"},{"$ref":"#/components/parameters/entityIdParam"},{"$ref":"#/components/parameters/addedAfterParam"},{"$ref":"#/components/parameters/addedBeforeParam"},{"$ref":"#/components/parameters/pageParam"},{"$ref":"#/components/parameters/pageSizeParam"},{"$ref":"#/components/parameters/auditEventOrderByParam"},{"$ref":"#/components/parameters/orderDirParam"}],"responses":{"200":{"description":"List of User objects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResponse"}}}}}},"post":{"tags":["Users"],"summary":"Create a User","description":"Creates a new user in AWS Cognito. Only StaffAdmins can create new users. An email with temporary password is sent to email address specified in the request body.","operationId":"CreateUser","parameters":[{"$ref":"#/components/parameters/authzHeader"}],"requestBody":{"description":"User input object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}},"required":true},"responses":{"200":{"description":"User output object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserResponse"}}}}}}}},"components":{"schemas":{"ListORTsResponse":{"type":"object","properties":{"orts":{"type":"array","items":{"$ref":"#/components/schemas/ORTMetadata"}}}},"CreateORTRequest":{"$ref":"#/components/schemas/ORTCreateSpec"},"CreateORTResponse":{"$ref":"#/components/schemas/ORT"},"UpdateORTRequest":{"$ref":"#/components/schemas/ORTUpdateSpec"},"RetrieveORTResponse":{"$ref":"#/components/schemas/ORTMetadata"},"UpdateORTResponse":{"$ref":"#/components/schemas/ORTMetadata"},"ORTCreateSpec":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"notes":{"type":"string"},"oid":{"type":"integer"}},"required":["name"],"example":{"name":"My Test Token","notes":"Created for load testing","oid":1234}},"ORTUpdateSpec":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"notes":{"type":"string"},"state":{"type":"string","enum":["A","I"]}},"example":{"name":"My Test Token","notes":"Created for load testing","state":"I"}},"ORT":{"title":"Merchant Access Token Object","type":"object","properties":{"id":{"type":"integer","example":1234},"name":{"type":"string","example":"Pankaj's Test Token","minLength":1,"maxLength":64},"oid":{"type":"integer","example":1234},"state":{"type":"string","enum":["A","I"],"example":"A"},"notes":{"type":"string","example":"Created for load testing"},"added":{"type":"string","format":"date-time"},"lastUpdated":{"type":"string","format":"date-time"},"lastValidated":{"type":"string","format":"date-time","readOnly":true},"tokenStr":{"type":"string","example":"eyJhb...Jtbv2QM"},"addedBy":{"type":"string","example":["tid:3459","uid:345"]}}},"ORTMetadata":{"title":"ORT Object","type":"object","properties":{"id":{"type":"integer","example":1234},"name":{"type":"string","example":"Pankaj's Test Token","minLength":1,"maxLength":64},"oid":{"type":"integer","example":435},"state":{"type":"string","enum":["A","I"],"example":"A"},"notes":{"type":"string","example":"Created for load testing"},"added":{"type":"string","format":"date-time"},"lastUpdated":{"type":"string","format":"date-time"},"lastValidated":{"type":"string","format":"date-time"},"addedBy":{"type":"string","example":["tid:3459","uid:345"]}}},"ListUsersResponse":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"metadata":{"$ref":"#/components/schemas/ListMetadata"}}},"CreateUserRequest":{"$ref":"#/components/schemas/UserCreateSpec"},"CreateUserResponse":{"$ref":"#/components/schemas/UserWithExtAttrs"},"RetrieveUserResponse":{"$ref":"#/components/schemas/UserWithExtAttrs"},"UpdateUserRequest":{"$ref":"#/components/schemas/UserUpdateSpec"},"UpdateUserResponse":{"$ref":"#/components/schemas/UserWithExtAttrs"},"User":{"type":"object","properties":{"id":{"type":"integer"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"cuid":{"type":"string","format":"uuid"},"phone":{"type":"string","format":"phone"},"deliveryMedium":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"added":{"type":"string"},"created":{"type":"string"},"lastUpdated":{"type":"string"},"enabled":{"type":"string"},"status":{"type":"string"},"fqoid":{"type":"string"},"oid":{"type":"integer"},"orgName":{"type":"string"},"groupNames":{"type":"array","items":{"type":"string"}}}},"UserCreateSpec":{"type":"object","properties":{"username":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","format":"phone"},"deliveryMedium":{"type":"string","enum":["EMAIL","SMS"],"default":"EMAIL"},"firstName":{"type":"string"},"lastName":{"type":"string"},"fqoid":{"type":"string"},"groupNames":{"type":"array","items":{"type":"string"}},"+ext:key":{"type":"object","description":"Multiple entries, one per key. JSON object as value."}},"required":["username","email","fqoid"]},"UserUpdateSpec":{"type":"object","properties":{"email":{"type":"string","format":"email"},"phone":{"type":"string","format":"phone"},"deliveryMedium":{"type":"string","enum":["EMAIL","SMS"],"default":"EMAIL"},"firstName":{"type":"string"},"lastName":{"type":"string"},"fqoid":{"type":"string"},"groupNames":{"type":"array","items":{"type":"string"}},"+ext:key":{"type":"object","description":"Multiple entries, one per key. JSON object as value."},"ext:key":{"type":"object","description":"Replace the value of the specified key in the extended attributes. Do nothing if key doesn't exist."},"-ext:key":{"type":"object","description":"Remove the specified key and its value from the extended attributes. Do nothing if key doesn't exist."}}},"UserWithExtAttrs":{"type":"object","properties":{"id":{"type":"integer"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"cuid":{"type":"string","format":"uuid"},"phone":{"type":"string","format":"phone"},"deliveryMedium":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"added":{"type":"string"},"created":{"type":"string"},"lastUpdated":{"type":"string"},"enabled":{"type":"string"},"status":{"type":"string"},"fqoid":{"type":"string"},"oid":{"type":"integer"},"orgName":{"type":"string"},"groupNames":{"type":"array","items":{"type":"string"}},"ext":{"type":"object","description":"JSON object representing extended attributes."}}},"CreateGroupRequest":{"$ref":"#/components/schemas/CreateGroupSpec"},"CreateGroupResponse":{"$ref":"#/components/schemas/GroupWithExtAttrs"},"UpdateGroupRequest":{"$ref":"#/components/schemas/UpdateGroupSpec"},"ListGroupsResponse":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}},"RetrieveGroupResponse":{"$ref":"#/components/schemas/GroupWithExtAttrs"},"UpdateGroupResponse":{"$ref":"#/components/schemas/GroupWithExtAttrs"},"CreateGroupSpec":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"+ext:key":{"type":"object","description":"Multiple entries, one per key. JSON object as value."}},"required":["name","description"],"example":{"name":"AwesomeUsers","description":"The chosen ones","+ext:menus":{"location":"top","title":"Display"}}},"UpdateGroupSpec":{"type":"object","properties":{"description":{"type":"string"},"+ext:key":{"type":"object","description":"Add or replace the value of the specified key in the extended attributes."},"ext:key":{"type":"object","description":"Replace the value of the specified key in the extended attributes. Do nothing if key doesn't exist."},"-ext:key":{"type":"object","description":"Remove the specified key and its value from the extended attributes. Do nothing if key doesn't exist."}}},"Group":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["S","N"]}}},"GroupWithExtAttrs":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["S","N"]},"ext":{"type":"string","description":"JSON object representing extended attributes."}}},"ListOrgsResponse":{"type":"object","properties":{"orgs":{"type":"array","items":{"$ref":"#/components/schemas/Org"}},"metadata":{"$ref":"#/components/schemas/ListMetadata"}}},"CreateOrgRequest":{"$ref":"#/components/schemas/OrgCreateSpec"},"CreateOrgResponse":{"$ref":"#/components/schemas/OrgWithExtAttrs"},"RetrieveOrgResponse":{"$ref":"#/components/schemas/OrgWithExtAttrs"},"UpdateOrgRequest":{"$ref":"#/components/schemas/OrgUpdateSpec"},"UpdateOrgResponse":{"$ref":"#/components/schemas/OrgWithExtAttrs"},"Org":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"mid":{"type":"string","description":"Merchant Identifier. Only for otype=Location"},"pid":{"type":"integer","description":"OID of the parent Org."},"rpid":{"type":"integer","description":"OID of the referral Org (ie; partner/developer)"},"otype":{"type":"string","enum":["Location","Company","Partner","CompanyNPartner","Unknown"]},"sfid":{"type":"string","description":"Salesforce Id of the corresponding record."},"added":{"type":"string"},"lastUpdated":{"type":"string"},"fqoid":{"type":"string"},"rfqoid":{"type":"string"}}},"OrgCreateSpec":{"type":"object","properties":{"name":{"type":"string"},"mid":{"type":"string"},"pid":{"type":"integer"},"rpid":{"type":"integer"},"otype":{"type":"string","enum":["Location","Company","Partner","CompanyNPartner","Unknown"]},"sfid":{"type":"string"}},"required":["name","pid","otype"]},"OrgUpdateSpec":{"type":"object","properties":{"name":{"type":"string"},"mid":{"type":"string"},"pid":{"type":"integer"},"rpid":{"type":"integer"},"otype":{"type":"string","enum":["Location","Company","Partner","CompanyNPartner","Unknown"]},"sfid":{"type":"string"}}},"OrgWithExtAttrs":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"mid":{"type":"string"},"pid":{"type":"integer"},"rpid":{"type":"integer"},"otype":{"type":"string","enum":["Location","Company","Partner","CompanyNPartner","Unknown"]},"sfid":{"type":"string"},"added":{"type":"string"},"lastUpdated":{"type":"string"},"fqoid":{"type":"string"},"rfqoid":{"type":"string"},"ext":{"type":"string","description":"JSON object representing extended attributes."}}},"ListAuthRulesResponse":{"type":"object","properties":{"authRules":{"type":"array","items":{"$ref":"#/components/schemas/AuthRule"}}}},"CreateAuthRuleRequest":{"$ref":"#/components/schemas/AuthRule"},"CreateAuthRuleResponse":{"$ref":"#/components/schemas/AuthRule"},"RetrieveAuthRuleResponse":{"$ref":"#/components/schemas/AuthRule"},"UpdateAuthRuleRequest":{"$ref":"#/components/schemas/AuthRule"},"UpdateAuthRuleResponse":{"$ref":"#/components/schemas/AuthRule"},"AuthRule":{"title":"AuthRule Object","type":"object","properties":{"id":{"type":"integer","example":1234,"readOnly":true},"method":{"type":"string","enum":["GET","POST","PUT","DELETE"],"example":"GET"},"urlPattern":{"type":"string","example":"^orts/*$"},"component":{"type":"string","example":"security"},"authTokenTypes":{"type":"array","items":{"type":"string","enum":["IDT","ORT"]},"example":["IDT"]},"groupNames":{"type":"array","items":{"type":"string"},"example":["StaffAdmins","StaffUsers"]}}},"AuthTokenType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"example":{"id":1234,"name":"MAT"}},"AuthGroup":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"}},"example":{"id":1234,"name":"StaffAdmins","description":"All powerful group."}},"ListAuditEventsResponse":{"type":"object","properties":{"orgs":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}},"metadata":{"$ref":"#/components/schemas/ListMetadata"}}},"AuditEvent":{"title":"AuditEvent Object","type":"object","properties":{"id":{"type":"integer","example":1234,"readOnly":true},"op":{"type":"string","enum":["CREATE","UPDATE","DELETE"],"example":"UPDATE"},"subType":{"type":"string","enum":["USER","ORGTOKEN","OTHER"],"example":"ORGTOKEN"},"subId":{"type":"integer","example":1234},"subName":{"type":"string","example":"Pankaj Kumar"},"entityType":{"type":"string","enum":["USER","ORG","GROUP","ORGTOKEN","AUTHRULE"],"example":"ORG"},"entityId":{"type":"integer","example":1234},"fqoid":{"type":"string","example":"1-1234567876"},"added":{"type":"string","example":"2018-05-01T19:22:44.860Z"},"oldValue":{"type":"string","example":{"\\\"firstName\\\":\\\"postman\\\"":null,"\\\"lastName\\\":\\\"testSuite\\\"":null}},"newValue":{"type":"string","example":{"\\\"firstName\\\":\\\"patched\\\"":null,"\\\"lastName\\\":\\\"updated\\\"":null}}}},"ListMetadata":{"type":"object","properties":{"numEntries":{"type":"integer","description":"No. of total matching entries. This may be more than entries returned."},"page":{"type":"integer","description":"Page number of returned entries. Starts with 1."},"pageSize":{"type":"integer","default":25,"description":"Max number of entries per page."},"orderBy":{"type":"string","description":"Field to order (ie; sort)) returned entries.","default":"depends on entity"},"orderDir":{"type":"string","enum":["ASC","DESC"],"description":"Sorting order. Could be ascending or descending."},"groupBy":{"type":"string","description":"Field to group. Also used as orderBy field when specified. The entries consist of single value -- number of rows in the group."},"params":{"type":"object","description":"URL parameters send with the request"}}}},"parameters":{"authzHeader":{"name":"Authorization","in":"header","description":"Logged-in user's ID Token or Org Token.","required":true,"style":"simple","explode":false,"schema":{"type":"string"},"example":"Bearer {{merchant_access or id token}}"},"aridPathComp":{"name":"arid","in":"path","description":"AuthRule Id. Returned by Create, Retrive, Update and List operations.","required":true,"style":"simple","explode":false,"schema":{"type":"integer"},"example":1234},"useridPathComp":{"name":"userid","in":"path","description":"username or cuid","required":true,"style":"simple","schema":{"type":"string"},"example":["jane","51971b5d-2932-4b94-ad8a-2bb75fc485ae"]},"tidPathComp":{"name":"tid","in":"path","description":"ORT Id. Returned by Create, Retrive, Update and List operations.","required":true,"style":"simple","explode":false,"schema":{"type":"integer"},"example":1234},"oidPathComp":{"name":"oid","in":"path","description":"Org Id. Returned by Create, Retrive, Update and List operations.","required":true,"style":"simple","explode":false,"schema":{"type":"integer"},"example":1234},"groupNamePathComp":{"name":"groupName","in":"path","description":"Group name","required":true,"style":"simple","explode":false,"schema":{"type":"string"},"example":"OrgUsers"},"pageParam":{"name":"page","in":"query","description":"page number for the paginated results.","schema":{"type":"integer","default":1},"required":false,"example":8},"pageSizeParam":{"name":"pageSize","in":"query","description":"number of entries per page","schema":{"type":"integer","default":25},"required":false,"example":30},"userOrderByParam":{"name":"orderBy","in":"query","description":"field to order result entries","schema":{"type":"string","enum":["username","email","groupName","orgName","firstName","lastName","status","added","lastUpdated"],"default":"lastUpdated"},"required":false,"example":"username"},"orderDirParam":{"name":"orderDir","in":"query","description":"ordering direction (ascending, descending) for the result entries","schema":{"type":"string","default":"DESC","enum":["ASC","DESC"]},"required":false,"example":"ASC"},"ngqParam":{"name":"ngq","in":"query","description":"search query term, to be broken into ngrams","schema":{"type":"string"},"required":false,"example":"Bridal"},"ngtParam":{"name":"ngt","in":"query","description":"search query type","schema":{"type":"string","default":"substring","enum":["substring","fuzzy"]},"required":false,"example":"fuzzy"},"userGroupByParam":{"name":"groupBy","in":"query","description":"field to perform grouping of results","schema":{"type":"string","enum":["groupName","orgName","firstName","lastName","status","addedDate","lastUpdatedDate"]},"required":false,"example":"addedDate"},"userFieldsParam":{"name":"fields","in":"query","description":"comma separated list of User fields to return","schema":{"type":"string"},"required":false,"example":"username,email,orgName"},"usernameParam":{"name":"username","description":"unique string identifying the User account","in":"query","schema":{"type":"string"},"required":false,"example":"jane"},"emailParam":{"name":"email","description":"email address associated with the User account","in":"query","schema":{"type":"string"},"required":false,"example":"jane@example.com"},"groupNameParam":{"name":"groupName","description":"name of a group/role user belongs to. A user may belong to multiple groups.","in":"query","schema":{"type":"string"},"required":false,"example":"StaffUsers"},"orgNameParam":{"name":"orgName","description":"name of the Org user belongs to","in":"query","schema":{"type":"string"},"required":false,"example":"1-800-Flowers"},"firstNameParam":{"name":"firstName","description":"first name","in":"query","schema":{"type":"string"},"required":false,"example":"Donald"},"lastNameParam":{"name":"lastName","description":"last name","in":"query","schema":{"type":"string"},"required":false,"example":"Trump"},"statusParam":{"name":"status","description":"current status of the user account. Possible values are -- UNCONFIRMED, CONFIRMED, ARCHIVED, COMPROMISED, UNKNOWN, RESET_REQUIRED, FORCE_CHANGE_PASSWORD","in":"query","schema":{"type":"string","enum":["UNCONFIRMED","CONFIRMED","ARCHIVED","COMPROMISED","UNKNOWN","RESET_REQUIRED","FORCE_CHANGE_PASSWORD"]},"required":false,"example":"CONFIRMED"},"lastUpdatedAfterParam":{"name":"addedAfter","in":"query","schema":{"type":"string","format":"date-time"},"required":false,"example":["2018-01-03","2018-01-15T23:08:21.000Z"]},"lastUpdatedBeforeParam":{"name":"addedBefore","in":"query","schema":{"type":"string","format":"date-time"},"required":false,"example":["2018-01-03","2018-01-15T23:08:21.000Z"]},"addedAfterParam":{"name":"addedAfter","in":"query","description":"lower timestamp for added duration","schema":{"type":"string","format":"date-time"},"required":false,"example":["2018-01-03","2018-01-15T23:08:21.000Z"]},"addedBeforeParam":{"name":"addedBefore","in":"query","description":"upper timestamp for added duration","schema":{"type":"string","format":"date-time"},"required":false,"example":["2018-01-03","2018-01-15T23:08:21.000Z"]},"nameParam":{"name":"name","description":"string associated with the Org account","in":"query","schema":{"type":"string"},"required":false,"example":"1-800-Flowers Inc"},"fqoidParam":{"name":"fqoid","description":"Fully qualified org id","in":"query","schema":{"type":"string"},"required":false,"example":["1-234-5678","self","all"]},"sfidParam":{"name":"sfid","description":"Salesforce Id","in":"query","schema":{"type":"string"}},"otypeParam":{"name":"otype","description":"Org Type","in":"query","schema":{"type":"string","enum":["Location","Company","Partner","CompanyNPartner","Unknown"]},"required":false},"orgOrderByParam":{"name":"orderBy","in":"query","description":"field to order result entries","schema":{"type":"string","enum":["name","added","lastUpdated"],"default":"lastUpdated"},"required":false,"example":"name"},"orgGroupByParam":{"name":"groupBy","in":"query","description":"field to perform grouping of results","schema":{"type":"string","enum":["otype","addedDate","lastUpdatedDate"]},"required":false,"example":"addedDate"},"orgFieldsParam":{"name":"fields","in":"query","description":"comma separated list of Org fields to return","schema":{"type":"string"},"required":false,"example":"id,name,otype"},"opParam":{"name":"op","description":"Operation Type","in":"query","schema":{"type":"string","enum":["CREATE","UPDATE","DELETE"]},"required":false},"subTypeParam":{"name":"subType","description":"Subject Type","in":"query","schema":{"type":"string","enum":["USER","ORGTOKEN","OTHER"]},"required":false},"subIdParam":{"name":"subId","description":"Id of the subject (Primary Key in DB)","in":"query","schema":{"type":"integer"}},"entityTypeParam":{"name":"entityType","description":"Entity Type","in":"query","schema":{"type":"string","enum":["USER","ORGTOKEN","ORG","GROUP","AUTHRULE"]},"required":false},"entityIdParam":{"name":"entityId","description":"Id of the entity (Primary Key in DB)","in":"query","schema":{"type":"integer"}},"auditEventOrderByParam":{"name":"orderBy","in":"query","description":"field to order result entries","schema":{"type":"string","enum":["added"],"default":"lastUpdated"},"required":false}}}}