Affinda Organization API - Invitation API
The Organization API - Invitation API from Affinda — 3 operation(s) for organization api - invitation.
The Organization API - Invitation API from Affinda — 3 operation(s) for organization api - invitation.
openapi: 3.0.3
info:
title: Affinda Annotations Add x-hidden to endpoints Organization API - Invitation API
version: 3.0.0
description: Affinda Annotations API — subset of the Affinda v3 Document Processing API.
servers:
- url: https://{region}.affinda.com
description: 'Select the correct server for your instance: api (AUS/Global), api.us1 (US), or api.eu1 (EU).'
variables:
region:
default: api
description: The instance region. Use 'api' for AUS/Global, 'api.us1' for US, or 'api.eu1' for EU. You can find your region in the Affinda web app URL.
enum:
- api
- api.eu1
- api.us1
x-ms-parameter-location: client
security:
- ApiKeyAuth: []
tags:
- name: Organization API - Invitation
paths:
/v3/invitations:
get:
x-hidden: true
tags:
- Organization API - Invitation
summary: Get list of all invitations
operationId: getAllInvitations
description: Get list of all invitations you created or sent to you.
parameters:
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/limitParam'
- in: query
name: organization
schema:
$ref: '#/components/schemas/Organization_properties-identifier'
description: Filter by organization.
- in: query
name: status
schema:
$ref: '#/components/schemas/InvitationStatus'
description: Filter by status.
- in: query
name: role
schema:
$ref: '#/components/schemas/OrganizationRole'
description: Filter by role.
responses:
'200':
description: All invitations you created or sent to you.
content:
application/json:
schema:
type: object
required:
- results
- count
allOf:
- $ref: '#/components/schemas/PaginatedResponse'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Invitation'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
post:
x-hidden: true
tags:
- Organization API - Invitation
summary: Create a new invitation
operationId: createInvitation
description: Create a new invitation.
responses:
'201':
description: Returns the created invitation
content:
application/json:
schema:
$ref: '#/components/schemas/Invitation'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
requestBody:
description: Invitation to create.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/InvitationCreate'
/v3/invitations/{identifier}:
get:
x-hidden: true
tags:
- Organization API - Invitation
summary: Get detail of an invitation
operationId: getInvitation
description: Get detail of an invitation.
parameters:
- in: path
required: true
name: identifier
description: Invitation identifier.
schema:
$ref: '#/components/schemas/Invitation_properties-identifier'
responses:
'200':
description: Successfully retrieved invitation.
content:
application/json:
schema:
$ref: '#/components/schemas/Invitation'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
patch:
x-hidden: true
tags:
- Organization API - Invitation
summary: Update an invitation
operationId: updateInvitation
description: Update the detail of an invitation.
parameters:
- in: path
required: true
name: identifier
description: Invitation identifier.
schema:
$ref: '#/components/schemas/Invitation_properties-identifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/InvitationUpdate'
responses:
'200':
description: Successfully updated invitation.
content:
application/json:
schema:
$ref: '#/components/schemas/Invitation'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
delete:
x-hidden: true
tags:
- Organization API - Invitation
summary: Delete an invitation
operationId: deleteInvitation
description: Delete the specified invitation from the database.
parameters:
- in: path
required: true
name: identifier
description: Invitation identifier.
schema:
$ref: '#/components/schemas/Invitation_properties-identifier'
responses:
'204':
$ref: '#/components/responses/204NoContent'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
/v3/invitations/token/{token}:
get:
x-hidden: true
tags:
- Organization API - Invitation
summary: Get detail of an invitation by token
operationId: getInvitationByToken
description: Get detail of an invitation using a secret token. This allows users who have not registered/logged in to view the invitation.
parameters:
- in: path
required: true
name: token
description: Invitation token.
schema:
type: string
responses:
'200':
description: Successfully retrieved invitation.
content:
application/json:
schema:
$ref: '#/components/schemas/Invitation'
'400':
$ref: '#/components/responses/400Error'
default:
$ref: '#/components/responses/DefaultError'
patch:
x-hidden: true
tags:
- Organization API - Invitation
summary: Respond to an invitation
operationId: respondToInvitation
description: Choose to accept or decline an invitation.
parameters:
- in: path
required: true
name: token
description: Invitation token.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/InvitationResponse'
responses:
'200':
description: Successfully responded to the invitation.
content:
application/json:
schema:
$ref: '#/components/schemas/Invitation'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
components:
schemas:
InvitationStatus:
type: string
enum:
- pending
- accepted
- declined
Invitation:
type: object
properties:
identifier:
type: string
description: Uniquely identify an invitation.
example: mEFayXdO
organization:
$ref: '#/components/schemas/Organization'
email:
type: string
example: carljohnson@grove.street
description: The email which the invitation is sent to.
role:
$ref: '#/components/schemas/OrganizationRole'
status:
$ref: '#/components/schemas/InvitationStatus'
expiryDate:
type: string
format: date
description: The date after which the invitation expires. Default is 10 days from now.
invitedBy:
$ref: '#/components/schemas/User'
respondedBy:
type: object
nullable: true
allOf:
- $ref: '#/components/schemas/User'
- type: object
description: The person who receives this invitation can register/signin with any account and respond to it. This field stores which account has responded to the invitation.
createdDt:
type: string
format: date-time
ThemeConfig:
type: object
properties:
palette:
type: object
properties:
mode:
type: string
enum:
- light
- dark
background:
oneOf:
- type: string
- type: object
properties:
default:
type: string
paper:
type: string
text:
type: object
properties:
primary:
type: string
secondary:
type: string
disabled:
type: string
divider:
type: string
primary:
$ref: '#/components/schemas/PaletteColorOptions'
secondary:
$ref: '#/components/schemas/PaletteColorOptions'
success:
$ref: '#/components/schemas/PaletteColorOptions'
annotation:
$ref: '#/components/schemas/PaletteColorOptions'
error:
$ref: '#/components/schemas/PaletteColorOptions'
info:
$ref: '#/components/schemas/PaletteColorOptions'
warning:
$ref: '#/components/schemas/PaletteColorOptions'
typography:
type: object
properties:
fontFamily:
type: string
fontSize:
oneOf:
- type: string
- type: number
fontWeightRegular:
type: string
fontWeightMedium:
type: string
fontWeightBold:
type: string
borderRadius:
type: number
fontUrl:
type: string
RequestError:
type: object
additionalProperties: false
required:
- type
- errors
properties:
type:
type: string
example: validation_error
errors:
type: array
items:
type: object
required:
- attr
- code
- detail
properties:
attr:
type: string
nullable: true
example: non_field_errors
code:
type: string
example: unique
detail:
type: string
example: This index name has already been used
properties-email:
type: string
example: carljohnson@grove.street
description: The email which the invitation is sent to.
InvitationResponse:
type: object
properties:
status:
type: string
enum:
- accepted
- declined
PaginatedResponse:
type: object
required:
- count
properties:
count:
type: integer
example: 10
description: Number of items in results.
minimum: 0
next:
type: string
nullable: true
description: URL to request next page of results.
previous:
type: string
nullable: true
description: URL to request previous page of results.
Organization_properties-identifier:
type: string
description: Uniquely identify an organization.
example: mEFayXdO
Invitation_properties-identifier:
type: string
description: Uniquely identify an invitation.
example: mEFayXdO
OrganizationRole:
type: string
enum:
- admin
- member
example: admin
User:
type: object
properties:
id:
type: integer
description: Uniquely identify a user.
example: 1
minimum: 1
name:
type: string
example: Carl Johnson
username:
type: string
example: carljohnson
email:
type: string
example: carljohnson@grove.street
avatar:
type: string
nullable: true
description: URL of the user's avatar.
example: https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG
InvitationUpdate:
type: object
properties:
role:
$ref: '#/components/schemas/OrganizationRole'
Organization:
type: object
properties:
identifier:
type: string
description: Uniquely identify an organization.
example: mEFayXdO
name:
type: string
example: Grove Street King
userRole:
type: string
allOf:
- $ref: '#/components/schemas/OrganizationRole'
nullable: true
description: The role of the logged in user within the organization.
avatar:
type: string
nullable: true
description: URL of the organization's avatar.
example: https://affinda-api.s3.amazonaws.com/media/org-avatar.png?AWSAccessKeyId=KEY&Signature=SIG
resthookSignatureKey:
type: string
nullable: true
description: Used to sign webhook payloads so you can verify their integrity.
example: 465c6598bd34c0558f0ce256c43209d49fa85b0ff3e4c18b24e408b7563143ad
isTrial:
type: boolean
validationToolConfig:
type: object
nullable: true
description: Configuration of the embeddable validation tool.
properties:
theme:
$ref: '#/components/schemas/ThemeConfig'
hideActions:
type: boolean
description: Hide the confirm document button and other actions.
hideCollection:
type: boolean
description: Hide the collection selector.
hideEditPages:
type: boolean
description: Hide the edit pages button.
hideExport:
type: boolean
description: Hide the export menu.
hideFilename:
type: boolean
description: Hide the filename input.
hideShowRawValues:
type: boolean
description: Hide the toggle for showing raw annotation values.
hideReject:
type: boolean
description: Hide the reject document button.
hideReparse:
type: boolean
description: Hide the reparse button.
hideRunOcr:
type: boolean
description: Hide the run OCR button.
hideTags:
type: boolean
description: Hide the tags editor.
hideWarnings:
type: boolean
description: Hide the warnings panel.
restrictDocumentSplitting:
type: boolean
description: Disable the page editor after a document has been split once.
disableCurrencyFormatting:
type: boolean
description: Disable currency formatting of decimals values.
disableEditDocumentMetadata:
type: boolean
description: Disable editing document metadata. Makes the collection selector, filename input and tags editor read only.
disableManualAnnotationEditing:
type: boolean
description: Disable manual editing of annotation values via the validation popover.
hideDocumentStatus:
type: boolean
description: Hide the document status indicator in the toolbar.
showCustomFieldCreation:
type: boolean
description: Whether to show the custom field creation in the UI.
InvitationCreate:
type: object
required:
- organization
- email
- role
properties:
organization:
$ref: '#/components/schemas/Organization_properties-identifier'
email:
$ref: '#/components/schemas/properties-email'
role:
$ref: '#/components/schemas/OrganizationRole'
PaletteColorOptions:
type: object
required:
- main
properties:
main:
type: string
light:
type: string
dark:
type: string
contrastText:
type: string
responses:
DefaultError:
description: UnexpectedError
content:
application/json:
schema:
$ref: '#/components/schemas/RequestError'
x-ms-error-response: true
400Error:
description: Bad request. If it is a validation error will contain a list of each invalid field
content:
application/json:
schema:
$ref: '#/components/schemas/RequestError'
x-ms-error-response: true
204NoContent:
description: Delete successful, no content returned
401Error:
description: Authorisation error
content:
application/json:
schema:
$ref: '#/components/schemas/RequestError'
x-ms-error-response: true
parameters:
limitParam:
in: query
name: limit
required: false
schema:
type: integer
minimum: 1
maximum: 100
example: 20
description: The numbers of results to return.
x-ms-parameter-location: method
offsetParam:
in: query
name: offset
required: false
schema:
type: integer
minimum: 0
example: 0
description: The number of documents to skip before starting to collect the result set.
x-ms-parameter-location: method
securitySchemes:
ApiKeyAuth:
type: http
scheme: bearer
description: 'Basic authentication using an API key, e.g. `{Authorization: Bearer aff_0bb4fbdf97b7e4111ff6c0015471094155f91}`.
You can find your API key within the Settings page of the [Affinda web app](https://app.affinda.com/). You can obtain an API key by [signing up for a free trial](https://app.affinda.com/auth/register).'