Openpath orgs/mailrooms API

The orgs/mailrooms API from Openpath — 5 operation(s) for orgs/mailrooms.

OpenAPI Specification

openpath-orgs-mailrooms-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Openpath API Documentation auth orgs/mailrooms API
  version: 1.0.0
  description: Authentication and Login
host: api.openpath.com
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: orgs/mailrooms
paths:
  /orgs/{orgId}/mailrooms:
    get:
      summary: List active mailrooms
      operationId: listMailrooms
      description: '__JWT is required for this endpoint with at least one of the following scopes__: o{params.orgId}-parcelMgmtParcels:r,o{params.orgId}-parcelMgmtParcels:w,o:w,o:r,s-o:r,s-o:w<br/><br/>__Endpoint name__: listMailrooms'
      parameters:
      - type: integer
        name: orgId
        in: path
        required: true
      - type: integer
        minimum: 1
        maximum: 1000
        name: limit
        in: query
      - type: integer
        default: 0
        minimum: 0
        name: offset
        in: query
      - type: string
        default: name
        pattern: ^[a-zA-Z0-9.]+(,\s*[a-zA-Z0-9.]+)*$
        name: sort
        in: query
      - type: string
        default: asc
        pattern: ^(asc|desc)+(,\s*(asc|desc)+)*$
        name: order
        in: query
      - type: string
        name: q
        in: query
      - type: string
        name: filter
        in: query
      - type: string
        name: preFilter
        in: query
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - orgs/mailrooms
      security:
      - jwt: []
      responses:
        '200':
          schema:
            type: object
            properties:
              totalCount:
                type: integer
              filteredCount:
                type: integer
              cursors:
                type: object
                properties:
                  nextCursor:
                    type: integer
                    x-nullable: true
                    x-alternatives:
                    - type: integer
                      x-nullable: true
                    - type: string
                      pattern: ^[a-zA-Z0-9,@._~-]+$
                      x-nullable: true
                  hasNextPage:
                    type: boolean
              data:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    name:
                      type: string
                    createdAt:
                      type: string
                      format: date
                    updatedAt:
                      type: string
                      format: date
                    site:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                      required:
                      - id
                    address:
                      type: string
                    address2:
                      type: string
                      x-nullable: true
                    city:
                      type: string
                    state:
                      type: string
                      x-nullable: true
                    zip:
                      type: string
                      x-nullable: true
                    country:
                      type: string
                    phone:
                      type: string
                      x-nullable: true
                    description:
                      type: string
                      x-nullable: true
                    timezone:
                      type: string
                    isSelfPickup:
                      type: boolean
                      default: false
                    isSignatureRequired:
                      type: boolean
                      default: false
                  required:
                  - id
                  - name
                  - address
                  - city
                  - country
                  - timezone
              meta:
                type: object
                properties:
                  accessToken:
                    x-nullable: true
                    type: object
                    properties:
                      scopeUpdatedAt:
                        type: string
                        format: date
                  siteSpecificAccess:
                    x-nullable: true
                    type: object
                    properties:
                      isSiteSpecific:
                        type: boolean
                      siteIds:
                        x-nullable: true
                        type: array
                        items:
                          type: integer
                      siteIdsByScope:
                        type: object
                        properties:
                          string:
                            x-nullable: true
                            type: array
                            items:
                              type: integer
                        x-nullable: true
          description: Successful
      x-op-scopes:
      - o{params.orgId}-parcelMgmtParcels:r
      - o{params.orgId}-parcelMgmtParcels:w
      - o:w
      - o:r
      - s-o:r
      - s-o:w
    post:
      summary: Create a mailroom
      operationId: createMailroom
      description: '__JWT is required for this endpoint with at least one of the following scopes__: o{params.orgId}-parcelMgmtParcels:w,o:w,s-o:w<br/><br/>__Endpoint name__: createMailroom'
      parameters:
      - type: integer
        name: orgId
        in: path
        required: true
      - in: body
        name: body
        schema:
          type: object
          properties:
            name:
              type: string
            siteId:
              type: number
            address:
              type: string
            address2:
              type: string
              x-nullable: true
            city:
              type: string
            zip:
              type: string
              x-nullable: true
            country:
              type: string
              x-convert:
                trim: true
            state:
              type: string
              x-convert:
                trim: true
              x-nullable: true
            phone:
              type: string
              x-nullable: true
            description:
              type: string
              x-nullable: true
            isSelfPickup:
              type: boolean
            isSignatureRequired:
              type: boolean
          required:
          - name
          - siteId
          - address
          - city
          - country
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - orgs/mailrooms
      security:
      - jwt: []
      responses:
        '201':
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  id:
                    type: number
                  name:
                    type: string
                  createdAt:
                    type: string
                    format: date
                  updatedAt:
                    type: string
                    format: date
                  site:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                    required:
                    - id
                  address:
                    type: string
                  address2:
                    type: string
                    x-nullable: true
                  city:
                    type: string
                  state:
                    type: string
                    x-nullable: true
                  zip:
                    type: string
                    x-nullable: true
                  country:
                    type: string
                  phone:
                    type: string
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  timezone:
                    type: string
                  isSelfPickup:
                    type: boolean
                    default: false
                  isSignatureRequired:
                    type: boolean
                    default: false
                required:
                - id
                - name
                - address
                - city
                - country
                - timezone
              meta:
                type: object
                properties:
                  accessToken:
                    x-nullable: true
                    type: object
                    properties:
                      scopeUpdatedAt:
                        type: string
                        format: date
                  siteSpecificAccess:
                    x-nullable: true
                    type: object
                    properties:
                      isSiteSpecific:
                        type: boolean
                      siteIds:
                        x-nullable: true
                        type: array
                        items:
                          type: integer
                      siteIdsByScope:
                        type: object
                        properties:
                          string:
                            x-nullable: true
                            type: array
                            items:
                              type: integer
                        x-nullable: true
          description: Created
      x-op-scopes:
      - o{params.orgId}-parcelMgmtParcels:w
      - o:w
      - s-o:w
  /orgs/{orgId}/mailrooms/{mailroomId}:
    get:
      summary: Describe a mailroom
      operationId: describeMailroom
      description: '__JWT is required for this endpoint with at least one of the following scopes__: o{params.orgId}-parcelMgmtParcels:r,o{params.orgId}-parcelMgmtParcels:w,o:w,o:r,s-o:r,s-o:w<br/><br/>__Endpoint name__: describeMailroom'
      parameters:
      - type: integer
        name: orgId
        in: path
        required: true
      - type: integer
        name: mailroomId
        in: path
        required: true
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - orgs/mailrooms
      security:
      - jwt: []
      responses:
        '200':
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  id:
                    type: number
                  name:
                    type: string
                  createdAt:
                    type: string
                    format: date
                  updatedAt:
                    type: string
                    format: date
                  site:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                    required:
                    - id
                  address:
                    type: string
                  address2:
                    type: string
                    x-nullable: true
                  city:
                    type: string
                  state:
                    type: string
                    x-nullable: true
                  zip:
                    type: string
                    x-nullable: true
                  country:
                    type: string
                  phone:
                    type: string
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  timezone:
                    type: string
                  isSelfPickup:
                    type: boolean
                    default: false
                  isSignatureRequired:
                    type: boolean
                    default: false
                required:
                - id
                - name
                - address
                - city
                - country
                - timezone
              meta:
                type: object
                properties:
                  accessToken:
                    x-nullable: true
                    type: object
                    properties:
                      scopeUpdatedAt:
                        type: string
                        format: date
                  siteSpecificAccess:
                    x-nullable: true
                    type: object
                    properties:
                      isSiteSpecific:
                        type: boolean
                      siteIds:
                        x-nullable: true
                        type: array
                        items:
                          type: integer
                      siteIdsByScope:
                        type: object
                        properties:
                          string:
                            x-nullable: true
                            type: array
                            items:
                              type: integer
                        x-nullable: true
          description: Successful
      x-op-scopes:
      - o{params.orgId}-parcelMgmtParcels:r
      - o{params.orgId}-parcelMgmtParcels:w
      - o:w
      - o:r
      - s-o:r
      - s-o:w
    delete:
      summary: Delete a mailroom
      operationId: deleteMailroom
      description: '__JWT is required for this endpoint with at least one of the following scopes__: o{params.orgId}-parcelMgmtParcels:w,o:w,s-o:w<br/><br/>__Endpoint name__: deleteMailroom'
      parameters:
      - type: integer
        name: orgId
        in: path
        required: true
      - type: integer
        name: mailroomId
        in: path
        required: true
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - orgs/mailrooms
      security:
      - jwt: []
      responses:
        '204':
          description: No Content
      x-op-scopes:
      - o{params.orgId}-parcelMgmtParcels:w
      - o:w
      - s-o:w
    patch:
      summary: Update a mailroom
      operationId: updateMailroom
      description: '__JWT is required for this endpoint with at least one of the following scopes__: o{params.orgId}-parcelMgmtParcels:w,o:w,s-o:w<br/><br/>__Endpoint name__: updateMailroom'
      parameters:
      - type: integer
        name: orgId
        in: path
        required: true
      - type: integer
        name: mailroomId
        in: path
        required: true
      - in: body
        name: body
        schema:
          type: object
          properties:
            name:
              type: string
            siteId:
              type: number
            address:
              type: string
            address2:
              type: string
              x-nullable: true
            city:
              type: string
            zip:
              type: string
              x-nullable: true
            country:
              type: string
              x-convert:
                trim: true
            state:
              type: string
              x-convert:
                trim: true
              x-nullable: true
            phone:
              type: string
              x-nullable: true
            description:
              type: string
              x-nullable: true
            isSelfPickup:
              type: boolean
            isSignatureRequired:
              type: boolean
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - orgs/mailrooms
      security:
      - jwt: []
      responses:
        '200':
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  id:
                    type: number
                  name:
                    type: string
                  createdAt:
                    type: string
                    format: date
                  updatedAt:
                    type: string
                    format: date
                  site:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                    required:
                    - id
                  address:
                    type: string
                  address2:
                    type: string
                    x-nullable: true
                  city:
                    type: string
                  state:
                    type: string
                    x-nullable: true
                  zip:
                    type: string
                    x-nullable: true
                  country:
                    type: string
                  phone:
                    type: string
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  timezone:
                    type: string
                  isSelfPickup:
                    type: boolean
                    default: false
                  isSignatureRequired:
                    type: boolean
                    default: false
                required:
                - id
                - name
                - address
                - city
                - country
                - timezone
              meta:
                type: object
                properties:
                  accessToken:
                    x-nullable: true
                    type: object
                    properties:
                      scopeUpdatedAt:
                        type: string
                        format: date
                  siteSpecificAccess:
                    x-nullable: true
                    type: object
                    properties:
                      isSiteSpecific:
                        type: boolean
                      siteIds:
                        x-nullable: true
                        type: array
                        items:
                          type: integer
                      siteIdsByScope:
                        type: object
                        properties:
                          string:
                            x-nullable: true
                            type: array
                            items:
                              type: integer
                        x-nullable: true
          description: Successful
      x-op-scopes:
      - o{params.orgId}-parcelMgmtParcels:w
      - o:w
      - s-o:w
  /orgs/{orgId}/mailrooms/statistics:
    get:
      summary: Get all mailroom statistics
      operationId: describeAllMailroomStatistics
      description: '__JWT is required for this endpoint with at least one of the following scopes__: o{params.orgId}-parcelMgmtParcels:r,o{params.orgId}-parcelMgmtParcels:w,o:w,o:r,s-o:r,s-o:w<br/><br/>__Endpoint name__: describeAllMailroomStatistics'
      parameters:
      - type: integer
        name: orgId
        in: path
        required: true
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - orgs/mailrooms
      security:
      - jwt: []
      responses:
        '200':
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  scannedCount:
                    type: number
                  pickedUpCount:
                    type: number
                  awaitingPickupCount:
                    type: number
                  averagePickupTime:
                    type: number
                  timeSince:
                    type: string
                    format: date
              meta:
                type: object
                properties:
                  accessToken:
                    x-nullable: true
                    type: object
                    properties:
                      scopeUpdatedAt:
                        type: string
                        format: date
                  siteSpecificAccess:
                    x-nullable: true
                    type: object
                    properties:
                      isSiteSpecific:
                        type: boolean
                      siteIds:
                        x-nullable: true
                        type: array
                        items:
                          type: integer
                      siteIdsByScope:
                        type: object
                        properties:
                          string:
                            x-nullable: true
                            type: array
                            items:
                              type: integer
                        x-nullable: true
          description: Successful
      x-op-scopes:
      - o{params.orgId}-parcelMgmtParcels:r
      - o{params.orgId}-parcelMgmtParcels:w
      - o:w
      - o:r
      - s-o:r
      - s-o:w
  /orgs/{orgId}/mailrooms/{mailroomId}/statistics:
    get:
      summary: Get single mailroom statistics
      operationId: describeMailroomStatistics
      description: '__JWT is required for this endpoint with at least one of the following scopes__: o{params.orgId}-parcelMgmtParcels:r,o{params.orgId}-parcelMgmtParcels:w,o:w,o:r,s-o:r,s-o:w<br/><br/>__Endpoint name__: describeMailroomStatistics'
      parameters:
      - type: integer
        name: orgId
        in: path
        required: true
      - type: integer
        name: mailroomId
        in: path
        required: true
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - orgs/mailrooms
      security:
      - jwt: []
      responses:
        '200':
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  scannedCount:
                    type: number
                  pickedUpCount:
                    type: number
                  awaitingPickupCount:
                    type: number
                  averagePickupTime:
                    type: number
                  timeSince:
                    type: string
                    format: date
              meta:
                type: object
                properties:
                  accessToken:
                    x-nullable: true
                    type: object
                    properties:
                      scopeUpdatedAt:
                        type: string
                        format: date
                  siteSpecificAccess:
                    x-nullable: true
                    type: object
                    properties:
                      isSiteSpecific:
                        type: boolean
                      siteIds:
                        x-nullable: true
                        type: array
                        items:
                          type: integer
                      siteIdsByScope:
                        type: object
                        properties:
                          string:
                            x-nullable: true
                            type: array
                            items:
                              type: integer
                        x-nullable: true
          description: Successful
      x-op-scopes:
      - o{params.orgId}-parcelMgmtParcels:r
      - o{params.orgId}-parcelMgmtParcels:w
      - o:w
      - o:r
      - s-o:r
      - s-o:w
  /orgs/{orgId}/mailrooms/cancel:
    delete:
      summary: Cancel mailroom
      operationId: cancelMailroom
      description: '__JWT is required for this endpoint with at least one of the following scopes__: o{params.orgId}-admin:w,o:w,s-o:w<br/><br/>__Endpoint name__: cancelMailroom'
      parameters:
      - type: integer
        name: orgId
        in: path
        required: true
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - orgs/mailrooms
      security:
      - jwt: []
      responses:
        '204':
          description: No Content
      x-op-scopes:
      - o{params.orgId}-admin:w
      - o:w
      - s-o:w
securityDefinitions:
  jwt:
    type: apiKey
    name: Authorization
    in: header
x-proxy-enabled: false