openapi: 3.2.0 info: version: 1.3.35 title: Versapay API Reference Divisions API contact: name: Versapay Support url: https://www.versapay.com/support email: support@versapay.com x-logo: url: https://developers.versapay.com/images/logo.png termsOfService: https://www.versapay.com/terms-of-use license: name: Copyright 2022 Versapay. All Rights Reserved. description: 'As a supplier divisions are used to group your invoices. ' servers: - url: https://secure.versapay.com description: Production - url: https://uat.versapay.com description: UAT tags: - name: Divisions description: 'As a supplier divisions are used to group your invoices. ' paths: /api/imports/division: post: summary: Create and Update Division description: "Create and update divisions. If the division already exists when a request is processed, it will be updated.

\nNote:\n * A Division cannot be deleted if it is:\n * related to any invoices\n * a parent division\n * The parent division must exist in order to add a child division to a hierarchy. Attempting to set an unknown parent code will permit the creation of the new division, but will not create a parent.\n" tags: - Divisions requestBody: required: true content: application/json: schema: type: object required: - code - name properties: code: type: string description: Division Code used on invoices example: DIV1 name: type: string description: Division Name example: Division One external_id: type: string description: Optional external identifier for the division example: '45332' deleted: type: boolean description: Optional value that indicates if the division is inactive (true) or active (false) example: false parent_code: type: string description: Optional value that indicates this is a child of another division. The value must be an existing division code to make this division part of a hierarchy. example: '' responses: '201': description: Created content: application/json: schema: type: object properties: identifier: type: string example: DIV1 message: type: string example: 1 division '401': $ref: '#/components/responses/UnauthorizedError' '412': $ref: '#/components/responses/PreconditionFailed' components: responses: PreconditionFailed: description: Precondition Failed content: application/json: schema: type: object properties: error: type: string description: Error message example: API token does not have permission for this request. Please contact your account administrator. UnauthorizedError: description: Unauthorized content: application/json: schema: type: object properties: error: type: string description: Error message example: You need to sign in or create an account before continuing. x-tagGroups: - name: Versapay API description: Introduction to the Versapay API. tags: - Overview - Versioning & Compatibility - Environments - Rate Limits - Authentication - Webhooks - Watermark & Limit - name: Collaborative AR description: Operations available for Collaborative AR integration. tags: - Reference Data - Onboarding - Ecommerce Integration - Orders - Order Transactions - Testing Order Transactions - Gift Cards - Card Present EMV - Settlement Reporting - Wallets - Customers - Invoices - Autopay - Invoicing Payments - Divisions - Notifications - Collaboration - File Imports