MaintainX Manufacturers API

Operations on Manufacturers and Models

OpenAPI Specification

maintainx-manufacturers-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Welcome to the MaintainX API documentation!<br/><br/>You can use the MaintainX API to programmatically interact with all the entities in MaintainX. Use it to retrieve and manage data of Work Orders, Work Requests, Assets, and more!<br/><br/>To get started, in your MaintainX account go to <a href="https://app.getmaintainx.com/settings/integrations/apiKeys">"Settings &gt; Integrations"</a> and click "&plus; New Key" button to generate a new Rest API key.<br/><br/><b>Missing something?</b><br/>Don't hesitate to reach out <a href="mailto:support@getmaintainx.com">support@getmaintainx.com</a><br/><br/>
  version: '1'
  title: MaintainX Asset Criticalities Manufacturers API
  contact:
    url: https://www.getmaintainx.com/
    name: Support
    email: support@getmaintainx.com
  x-logo:
    url: https://maintainx-static.s3-us-west-2.amazonaws.com/img/default-org-logo.png
    backgroundColor: '#FFFFFF'
    altText: MaintainX logo
servers:
- url: https://api.getmaintainx.com/v1
  description: Endpoint
security:
- Bearer: []
tags:
- name: Manufacturers
  description: Operations on Manufacturers and Models
  x-traitTag: false
paths:
  /manufacturers:
    get:
      summary: List manufacturers
      description: Endpoint used to list manufacturer resources
      parameters:
      - name: cursor
        in: query
        schema:
          description: Last pagination reference
          type: string
      - name: limit
        in: query
        schema:
          description: max number of Manufacturers returned
          type: integer
          minimum: 1
          maximum: 200
          default: 100
      - schema:
          type: integer
        description: Required if using a multi organizations token
        name: x-organization-id
        in: header
        required: false
        example: '1'
      - schema:
          type: string
        description: Required if using a multi organizations token and doing an operation on resources from multiple organizations. This is mutually exclusive with the x-organization-id header (use one or the other).
        name: x-organization-ids
        in: header
        required: false
        example: 1,2,3
      responses:
        '200':
          description: Successfully fetched Manufacturers list
          content:
            application/json:
              schema:
                type: object
                required:
                - manufacturers
                properties:
                  manufacturers:
                    type: array
                    items:
                      type: object
                      required:
                      - id
                      - name
                      properties:
                        id:
                          type: integer
                          example: 963
                          description: Unique ID of the manufacturer.
                        name:
                          type: string
                          example: ACME Corporation
                          description: Manufacturer name.
                        organizationId:
                          type: integer
                          example: 1
                          description: ID of the organization that owns this resource
                  nextCursor:
                    description: The cursor to retrieve the next page of Manufacturers.
                    type: string
                    nullable: true
                  nextPageUrl:
                    description: Path with query parameters that can be used to retrieve the next page of Manufacturers.
                    type: string
                    nullable: true
        '400':
          description: Error with query
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    description: Description of error
                    type: string
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: Manufacturer REST API list is currently disabled
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Manufacturer REST API list is currently disabled.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
      tags:
      - Manufacturers
    post:
      summary: Create new manufacturer
      requestBody:
        description: Manufacturer to create
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  example: ACME Corporation
                  description: Manufacturer name.
      responses:
        '201':
          description: Successfully created manufacturer
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                properties:
                  id:
                    type: integer
                    example: 963
                    description: Unique ID of the manufacturer.
        '400':
          description: OrganizationId was not provided
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Missing x-organization-id header.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: Manufacturer REST API creation is currently disabled
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Manufacturer REST API creation is currently disabled.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: Internal server error.
      tags:
      - Manufacturers
      parameters:
      - schema:
          type: boolean
        description: Set `skipWebhook=true`, `skipWebhook=1` or `skipWebhook=yes` to skip all webhooks upon successful operation on the endpoint. [Learn more about webhooks](#tag/Subscriptions-and-Webhooks)
        name: skipWebhook
        in: query
        required: false
      - schema:
          type: integer
        description: Required if using a multi organizations token
        name: x-organization-id
        in: header
        required: false
        example: '1'
  /manufacturers/{id}:
    get:
      summary: Get manufacturer
      parameters:
      - schema:
          type: integer
        name: id
        in: path
        required: true
        description: ID of the manufacturer
        example: '1'
      - schema:
          type: integer
        description: Required if using a multi organizations token
        name: x-organization-id
        in: header
        required: false
        example: '1'
      responses:
        '200':
          description: Successfully retrieved manufacturer's information
          content:
            application/json:
              schema:
                type: object
                required:
                - manufacturer
                properties:
                  manufacturer:
                    type: object
                    required:
                    - id
                    - name
                    properties:
                      id:
                        type: integer
                        example: 963
                        description: Unique ID of the manufacturer.
                      name:
                        type: string
                        example: ACME Corporation
                        description: Manufacturer name.
        '400':
          description: OrganizationId was not provided
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Missing x-organization-id header.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: Manufacturer REST API get is currently disabled
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Manufacturer REST API get is currently disabled.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
        '404':
          description: Could not find the specified manufacturer.
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: manufacturer Not Found
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: Internal server error.
      tags:
      - Manufacturers
  /models:
    get:
      summary: List models
      description: Endpoint used to list model resources
      parameters:
      - name: cursor
        in: query
        schema:
          description: Last pagination reference
          type: string
      - name: limit
        in: query
        schema:
          description: max number of Models returned
          type: integer
          minimum: 1
          maximum: 200
          default: 100
      - schema:
          type: integer
        description: Required if using a multi organizations token
        name: x-organization-id
        in: header
        required: false
        example: '1'
      - schema:
          type: string
        description: Required if using a multi organizations token and doing an operation on resources from multiple organizations. This is mutually exclusive with the x-organization-id header (use one or the other).
        name: x-organization-ids
        in: header
        required: false
        example: 1,2,3
      responses:
        '200':
          description: Successfully fetched Models list
          content:
            application/json:
              schema:
                type: object
                required:
                - models
                properties:
                  models:
                    type: array
                    items:
                      type: object
                      required:
                      - id
                      - name
                      properties:
                        id:
                          type: integer
                          example: 963
                          description: Unique ID of the manufacturer model.
                        name:
                          type: string
                          example: D10
                          description: Model name.
                        manufacturerId:
                          type: integer
                          nullable: true
                          example: 123
                          description: Manufacturer ID the model belongs to.
                        organizationId:
                          type: integer
                          example: 1
                          description: ID of the organization that owns this resource
                  nextCursor:
                    description: The cursor to retrieve the next page of Models.
                    type: string
                    nullable: true
                  nextPageUrl:
                    description: Path with query parameters that can be used to retrieve the next page of Models.
                    type: string
                    nullable: true
        '400':
          description: Error with query
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    description: Description of error
                    type: string
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: Model REST API list is currently disabled
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Model REST API list is currently disabled.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
      tags:
      - Manufacturers
    post:
      summary: Create new model
      requestBody:
        description: Manufacturer model to create
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - manufacturerId
              properties:
                name:
                  type: string
                  example: D10
                  description: Model name.
                manufacturerId:
                  type: integer
                  example: 123
                  description: Manufacturer ID the model belongs to.
      responses:
        '201':
          description: Successfully created manufacturer model
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                properties:
                  id:
                    type: integer
                    example: 963
                    description: Unique ID of the manufacturer model.
        '400':
          description: OrganizationId was not provided
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Missing x-organization-id header.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: Manufacturer model REST API creation is currently disabled
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Manufacturer model REST API creation is currently disabled.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
        '404':
          description: Could not find the specified manufacturer.
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: manufacturer Not Found
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: Internal server error.
      tags:
      - Manufacturers
      parameters:
      - schema:
          type: boolean
        description: Set `skipWebhook=true`, `skipWebhook=1` or `skipWebhook=yes` to skip all webhooks upon successful operation on the endpoint. [Learn more about webhooks](#tag/Subscriptions-and-Webhooks)
        name: skipWebhook
        in: query
        required: false
      - schema:
          type: integer
        description: Required if using a multi organizations token
        name: x-organization-id
        in: header
        required: false
        example: '1'
  /models/{id}:
    get:
      summary: Get model
      parameters:
      - schema:
          type: integer
        name: id
        in: path
        required: true
        description: ID of the model
        example: '1'
      - schema:
          type: integer
        description: Required if using a multi organizations token
        name: x-organization-id
        in: header
        required: false
        example: '1'
      responses:
        '200':
          description: Successfully retrieved model information
          content:
            application/json:
              schema:
                type: object
                required:
                - model
                properties:
                  model:
                    type: object
                    required:
                    - id
                    - name
                    properties:
                      id:
                        type: integer
                        example: 963
                        description: Unique ID of the manufacturer model.
                      name:
                        type: string
                        example: D10
                        description: Model name.
                      manufacturerId:
                        type: integer
                        nullable: true
                        example: 123
                        description: Manufacturer ID the model belongs to.
        '400':
          description: OrganizationId was not provided
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Missing x-organization-id header.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: Model REST API get is currently disabled
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                example:
                  errors:
                  - error: Model REST API get is currently disabled.
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - error
                      properties:
                        error:
                          type: string
                        fieldPath:
                          nullable: true
                          type: string
                        fieldValue:
                          nullable: true
                          oneOf:
                          - type: string
                          - type: number
                          - type: boolean
        '404':
          description: Could not find the specified model.
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: model Not Found
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: Internal server error.
      tags:
      - Manufacturers
components:
  responses:
    UnauthorizedError:
      description: Invalid token
  securitySchemes:
    Bearer:
      description: "\n  <p>Authenticate by adding the following HTTP header to your requests:</p>\n<pre>Authorization: bearer {{token}}</pre>\n<p>The <code>token</code> can be generated in your MaintainX account. Go to <a href=\"https://app.getmaintainx.com/settings/integrations/apiKeys\">\"Settings &gt; Integrations &gt; API Keys\"</a> to generate a key for your user.</p>\n"
      type: http
      scheme: bearer
      bearerFormat: JWT
x-webhooks:
  API_TOKEN_CREATED:
    post:
      summary: API Token Created
      security: []
      description: Fires when a REST API token is generated.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: API_TOKEN_CREATED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  API_TOKEN_REVOKED:
    post:
      summary: API Token Revoked
      security: []
      description: Fires when a REST API token is revoked.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: API_TOKEN_REVOKED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  ASSET_STATUS_CHANGE:
    post:
      summary: Asset Status Change
      security: []
      description: ''
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - assetId
              - orgId
              - oldStatus
              - newStatus
              - occurredAt
              properties:
                assetId:
                  type: number
                  description: Global ID of the asset
                  example: 42
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 21
                oldStatus:
                  description: Previous status of the asset
                  type: object
                  properties:
                    id:
                      type: number
                      example: 42
                      description: Global ID of the asset status.
                    customStatus:
                      type: object
                      required:
                      - label
                      properties:
                        id:
                          type: number
                          example: Global ID of the custom asset status.
                        label:
                          type: string
                          example: Decommissioned
                        createdAt:
                          type: string
                          format: date-time
                          description: Date & time at which the asset custom status was created.
                          example: '2022-01-01T12:34:56.123Z'
                        updatedAt:
                          type: string
                          format: date-time
                          description: Date & time at which the asset custom status was last updated.
                          example: '2022-01-01T12:34:56.123Z'
                        deletedAt:
                          type: string
                          nullable: true
                          description: Date at which the asset custom status was deleted.
                          format: date-time
                          example: '2022-01-01T12:34:56.123Z'
                        downtimeType:
                          type: string
                          nullable: true
                          example: null
                          enum:
                          - PLANNED
                          - UNPLANNED
                          deprecated: true
                          description: Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead.
                      description: Custom status assigned to asset.
                      nullable: true
                    customStatusId:
                      type: number
                      description: Id of the custom status assigned to asset.
                      nullable: true
                      example: 53
                    status:
                      type: string
                      example: OFFLINE
                      description: Asset status value.
                      enum:
                      - IGNORE
                      - OFFLINE
                      - ONLINE
                    downtimeType:
                      type: string
                      nullable: true
                      example: PLANNED
                      enum:
                      - PLANNED
                      - UNPLANNED
                    startedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      description: Asset status effective start date.
                    endedAt:
                      type: string
                

# --- truncated at 32 KB (207 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/maintainx/refs/heads/main/openapi/maintainx-manufacturers-api-openapi.yml