Procurify account-codes API

The account-codes API from Procurify — 2 operation(s) for account-codes.

OpenAPI Specification

procurify-account-codes-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Procurify API Documentation account-codes API
  version: ''
  description: '

    # Disclaimer


    - Procurify’s API is evolving and is subject to change at any time. Additionally, aspects of the API are undocumented, including certain methods, events, and properties. Given that both documented and undocumented aspects of the Procurify API may change at any time, the client relies on the API at their own risk.

    - Client (and/or client’s representative) is responsible for building, testing, and maintaining any API connection between Procurify and any other tool.  Procurify’s responsibility strictly involves providing support on clarifications in regards to the issued API document.

    - Procurify’s API is offered on an “as is” and “as available” basis, without warranties of any kind. By accepting this agreement, you agree that you have read the current API documentation, and accept the API functionality in its current state including current limitations. For questions and clarification around the documentation, please contact support@procurify.com.

    - In accordance with Section 2.(b) of our Subscription Services Agreement, Procurify reserves the right to deny access to our API at any time. If your API requests are too large and time out, contact us immediately to avoid possible suspension of access.

    - You may not attempt to reverse engineer or otherwise derive source code, trade secrets, or know-how in the Procurify API or portion thereof. You may not use the Procurify API to replicate or compete with core products or services offered by Procurify.

    '
servers:
- url: https://{user_domain}.procurify.com
  description: Your Procurify domain
  variables:
    user_domain:
      default: your-domain
      description: Your procurify domain
tags:
- name: account-codes
paths:
  /api/v3/account-codes/:
    get:
      operationId: account_codes_list
      description: '**Account Code Types**


        | Account Code Type | Type |

        |-------------------|------|

        | ASSETS            | 0    |

        | LIABILITY         | 1    |

        | EXPENSE           | 2    |

        | INCOME            | 3    |

        | EQUITY            | 4    |

        | OTHER             | 5    |'
      summary: Get Account Codes
      parameters:
      - in: query
        name: active
        schema:
          type: boolean
      - in: query
        name: code
        schema:
          type: string
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: query
        name: is_parent
        schema:
          type: boolean
      - name: order_by
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - account-codes
      security:
      - RemoteAuthentication: []
      - M2MAuthentication: []
      - BasicAuthentication: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAccountCodeReadList'
            text/csv:
              schema:
                $ref: '#/components/schemas/PaginatedAccountCodeReadList'
          description: ''
    post:
      operationId: account_codes_create
      description: '**Account Code Types**


        | Account Code Type | Type |

        |-------------------|------|

        | ASSETS            | 0    |

        | LIABILITY         | 1    |

        | EXPENSE           | 2    |

        | INCOME            | 3    |

        | EQUITY            | 4    |

        | OTHER             | 5    |'
      summary: Create Account Codes
      parameters:
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - account-codes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountCodeCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AccountCodeCreateRequest'
          ? ''
          : schema:
              $ref: '#/components/schemas/AccountCodeCreateRequest'
          application/xml:
            schema:
              $ref: '#/components/schemas/AccountCodeCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AccountCodeCreateRequest'
        required: true
      security:
      - RemoteAuthentication: []
      - M2MAuthentication: []
      - BasicAuthentication: []
      - cookieAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountCodeReadSerializerSingleCreate'
            text/csv:
              schema:
                $ref: '#/components/schemas/AccountCodeReadSerializerSingleCreate'
          description: ''
  /api/v3/account-codes/{id}/:
    put:
      operationId: account_codes_update
      description: '**Account Code Types**


        | Account Code Type | Type |

        |-------------------|------|

        | ASSETS            | 0    |

        | LIABILITY         | 1    |

        | EXPENSE           | 2    |

        | INCOME            | 3    |

        | EQUITY            | 4    |

        | OTHER             | 5    |'
      summary: Update Account Code
      parameters:
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this account code.
        required: true
      tags:
      - account-codes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountCodeUpdateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AccountCodeUpdateRequest'
          ? ''
          : schema:
              $ref: '#/components/schemas/AccountCodeUpdateRequest'
          application/xml:
            schema:
              $ref: '#/components/schemas/AccountCodeUpdateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AccountCodeUpdateRequest'
        required: true
      security:
      - RemoteAuthentication: []
      - M2MAuthentication: []
      - BasicAuthentication: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountCodeReadSerializerSingleUpdate'
            text/csv:
              schema:
                $ref: '#/components/schemas/AccountCodeReadSerializerSingleUpdate'
          description: ''
components:
  schemas:
    AccountCodeRead:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        applied_accounts_count:
          type: integer
          readOnly: true
        code:
          type: string
          maxLength: 50
        code_length:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        description:
          type: string
          maxLength: 200
        account_type:
          allOf:
          - $ref: '#/components/schemas/AccountTypeEnum'
          minimum: -2147483648
          maximum: 2147483647
        active:
          type: boolean
        parent:
          type: integer
          nullable: true
      required:
      - code
      - description
    AccountCodeReadSerializerSingleUpdate:
      type: object
      properties:
        metadata:
          type: object
          additionalProperties: {}
          default: {}
        data:
          $ref: '#/components/schemas/AccountCodeRead'
      required:
      - data
    AccountCodeCreateRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          maxLength: 50
        description:
          type: string
          minLength: 1
          maxLength: 200
        parent:
          type: integer
          nullable: true
        account_type:
          allOf:
          - $ref: '#/components/schemas/AccountTypeEnum'
          minimum: -2147483648
          maximum: 2147483647
        departments:
          type: array
          items:
            type: integer
      required:
      - code
      - description
    AccountTypeEnum:
      enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      type: integer
      description: '* `0` - Assets

        * `1` - Liability

        * `2` - Expense

        * `3` - Income

        * `4` - Equity

        * `5` - Other'
    PaginatedAccountCodeReadList:
      type: object
      properties:
        metadata:
          type: object
          properties:
            pagination:
              type: object
              properties:
                count:
                  type: integer
                  example: 10
                next:
                  type: string
                  nullable: true
                  format: uri
                  example: null
                previous:
                  type: string
                  nullable: true
                  format: uri
                  example: null
                page_size:
                  type: integer
                  example: 10
                num_pages:
                  type: integer
                  example: 1
                current_page:
                  type: integer
                  example: 1
          example:
            pagination:
              count: 10
              next: null
              previous: null
              page_size: 10
              num_pages: 1
              current_page: 1
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountCodeRead'
    AccountCodeReadSerializerSingleCreate:
      type: object
      properties:
        metadata:
          type: object
          additionalProperties: {}
          default: {}
        data:
          $ref: '#/components/schemas/AccountCodeRead'
      required:
      - data
    AccountCodeUpdateRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          maxLength: 50
        description:
          type: string
          minLength: 1
          maxLength: 200
        account_type:
          allOf:
          - $ref: '#/components/schemas/AccountTypeEnum'
          minimum: -2147483648
          maximum: 2147483647
        parent:
          type: integer
          nullable: true
      required:
      - code
      - description
  securitySchemes:
    BasicAuthentication:
      type: http
      scheme: basic
    M2MAuthentication:
      type: http
      scheme: bearer
      bearerFormat: JWT
    RemoteAuthentication:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://<your-domain>.procurify.com/oauth/authorize
          tokenUrl: https://<your-domain>.procurify.com/oauth/token
          scopes: {}
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid