Xentral Purchase Order API

Purchase Orders made at a supplier.

OpenAPI Specification

xentral-purchase-order-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Xentral Account Purchase Order API
  version: v0.1
  description: Xentral is an ERP platform.
  contact:
    name: Xentral
    url: https://xentral.com
    email: api@xentral.com
servers:
- url: https://{xentralId}.xentral.biz
  description: Your Xentral Instance
  variables:
    xentralId:
      default: xentral
- url: https://{domain}
  description: Xentral at a custom domain
  variables:
    domain:
      default: xentral.com
security:
- BearerAuth: []
tags:
- name: Purchase Order
  description: Purchase Orders made at a supplier.
paths:
  /api/v1/purchaseOrders:
    get:
      tags:
      - Purchase Order
      operationId: purchaseOrder.list
      summary: List purchase orders
      description: Lists all available purchase orders.
      parameters:
      - name: filter
        in: query
        style: deepObject
        schema:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              key:
                type: string
                enum:
                - id
                - status
                - date
                - supplier
                - documentNumber
                - project
                - createdAt
                - updatedAt
                - salesOrderConfirmationReference
                - suppliersOfferReference
              op:
                type: string
                enum:
                - equals
                - notEquals
                - in
                - notIn
                - exactlyIn
                - allIn
                - allNotIn
                - contains
                - notContains
                - startsWith
                - endsWith
                - greaterThan
                - lessThan
                - is
                - lessThanOrEquals
                - greaterThanOrEquals
              value:
                oneOf:
                - type: string
                  description: Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.
                  title: String
                - type: array
                  description: Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.
                  title: Array
                  items:
                    type: string
      - in: query
        name: page
        required: false
        style: deepObject
        schema:
          type: object
          additionalProperties: false
          required:
          - number
          - size
          properties:
            number:
              type: string
              pattern: \d+
              description: Page number should be an integer greater than or equal to 1
            size:
              type: string
              pattern: \d+
              description: Page size should usually be an integer between 10 and 50.
      - name: order
        in: query
        style: deepObject
        schema:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              field:
                type: string
                enum:
                - id
                - date
                - project
                - status
                - documentNumber
              dir:
                type: string
                enum:
                - asc
                - desc
      responses:
        '200':
          description: Operation completed successfully.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                description: List information of the purchase order.
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        id:
                          type: string
                          pattern: \d+
                          example: '17'
                          description: Resource identifier.
                        date:
                          type: string
                          format: date
                          description: Date of the purchase order.
                          example: '2024-09-24'
                        project:
                          description: Reference to another resource
                          type: object
                          additionalProperties: false
                          required:
                          - id
                          properties:
                            id:
                              type: string
                              pattern: \d+
                              example: '17'
                              description: Resource identifier.
                          example:
                            id: '1337'
                        status:
                          type: string
                          description: Current status of the purchase order.
                          example: Pending
                        documentNumber:
                          type: string
                          description: Document number of the purchase order.
                          example: DOC-2024-4567
                        supplier:
                          type: object
                          additionalProperties: false
                          properties:
                            id:
                              type: string
                              pattern: \d+
                              example: '17'
                              description: Resource identifier.
                            number:
                              type: string
                            customerNumberAtSupplier:
                              type: string
                            honorific:
                              type: string
                              description: Honorific of the billing address.
                            name:
                              type: string
                              description: Name of the billing address.
                            department:
                              type: string
                              description: Department of the billing address.
                            subDepartment:
                              type: string
                              description: Subdepartment of the billing address.
                            extraAddressLine:
                              type: string
                              description: Extra address line of the billing address.
                            street:
                              type: string
                              description: Street of the billing address.
                            zipCode:
                              type: string
                              description: Zip code of the billing address.
                            city:
                              type: string
                              description: City of the billing address.
                            state:
                              type: string
                              description: State of the billing address.
                            country:
                              type: string
                              description: Country of the billing address.
                            contactPerson:
                              type: string
                              description: Contact person of the billing address.
                            telephone:
                              type: string
                              description: Telephone of the billing address.
                            telefax:
                              type: string
                              description: Telefax of the billing address.
                            email:
                              type: string
                              description: E-mail of the billing address.
                          example:
                            id: supplier-12345
                            number: S-2024-001
                            customerNumberAtSupplier: CUST-001
                            honorific: Mr.
                            name: John Doe Enterprises
                            department: Procurement
                            subDepartment: Supplier Relations
                            extraAddressLine: 'Attn: Accounts Payable'
                            street: 123 Main St.
                            zipCode: '10115'
                            city: Berlin
                            state: Berlin
                            country: Germany
                            contactPerson: Jane Smith
                            telephone: +49 30 123456
                            telefax: +49 30 654321
                            email: contact@johndoenterprises.com
                          description: Information about the supplier of the purchase order.
                        requestForQuotation:
                          description: Nullable reference to another resource
                          type: object
                          additionalProperties: false
                          nullable: true
                          required:
                          - id
                          properties:
                            id:
                              type: string
                              pattern: \d+
                              example: '17'
                              description: Resource identifier.
                          example:
                            id: '1337'
                        bodyIntroduction:
                          type: string
                          description: Text above the position table in the PDF.
                          example: Welcome to our product catalog. Please find the details below.
                        bodyOutroduction:
                          type: string
                          description: Text below the position table in the PDF.
                          example: Thank you for reviewing our offerings. We look forward to your order.
                        salesOrderConfirmationReference:
                          type: string
                          description: Reference of the sales order confirmation.
                          example: SO123456789
                        isConfirmationRequested:
                          type: boolean
                          description: Shows if a confirmation is requested.
                          example: true
                        suppliersOfferReference:
                          type: string
                          description: Offer reference of the supplier.
                          example: SUP-REF-2024-001
                        internalDesignation:
                          type: string
                          description: Internal designation of the purchase order.
                          example: PO-INV-2024-001
                        language:
                          type: object
                          additionalProperties: false
                          description: Language of the purchase order.
                          properties:
                            iso2:
                              type: string
                              pattern: '[A-Z]{2}'
                          example:
                            iso2: DE
                        isConfirmed:
                          type: boolean
                          description: Shows if the purchase order is confirmed.
                          example: false
                        confirmedVia:
                          type: string
                          description: Shows via the purchase order was confirmed.
                          example: email
                        differingDesignation:
                          type: boolean
                          description: Shows if differing designation is enabled.
                          example: false
                        financials:
                          type: object
                          additionalProperties: false
                          description: Financial information about the purchase order.
                          properties:
                            paymentMethod:
                              description: Nullable reference to another resource
                              type: object
                              additionalProperties: false
                              nullable: true
                              required:
                              - id
                              properties:
                                id:
                                  type: string
                                  pattern: \d+
                                  example: '17'
                                  description: Resource identifier.
                              example:
                                id: '1337'
                            total:
                              description: Money object with amount and currency
                              example:
                                amount: '13.37'
                                currency: EUR
                              type: object
                              additionalProperties: false
                              properties:
                                amount:
                                  description: A string representing the amount
                                  type: string
                                  format: float
                                  example: '24.99'
                                currency:
                                  type: string
                                  pattern: '[A-Z]{3}'
                                  enum:
                                  - EUR
                                  - USD
                                  - JPY
                                  - BGN
                                  - CZK
                                  - DKK
                                  - GBP
                                  - HUF
                                  - PLN
                                  - RON
                                  - SEK
                                  - CHF
                                  - ISK
                                  - NOK
                                  - HRK
                                  - RUB
                                  - TRY
                                  - AUD
                                  - BRL
                                  - CAD
                                  - CNY
                                  - HKD
                                  - IDR
                                  - ILS
                                  - INR
                                  - KRW
                                  - MXN
                                  - MYR
                                  - NZD
                                  - PHP
                                  - SGD
                                  - THB
                                  - ZAR
                                  - ARS
                                  - CLP
                                  - SAR
                                  - AED
                                  - QAR
                                  description: Currency matches one of currency values as specified in ISO-4217.
                                  example: PLN
                            paymentTerms:
                              type: object
                              additionalProperties: false
                              description: Information about payment terms of the purchase order.
                              properties:
                                paymentTargetDiscount:
                                  type: number
                                  format: float
                                paymentTargetDays:
                                  type: number
                                paymentTargetDiscountDays:
                                  type: number
                                paymentTargetDiscountAmount:
                                  type: number
                                  format: float
                                isPaymentTargetDiscountApplied:
                                  type: boolean
                            costCenter:
                              type: string
                              description: The assigned cost center for the purchase order.
                            tax:
                              type: object
                              additionalProperties: false
                              description: Tax information of the purchase order.
                              properties:
                                taxation:
                                  type: string
                                vatId:
                                  type: string
                                taxDisplay:
                                  type: string
                          example:
                            paymentMethod:
                              id: '1337'
                            total:
                              amount: '1500.00'
                              currency: EUR
                            paymentTerms:
                              paymentTargetDiscount: 5
                              paymentTargetDays: 30
                              paymentTargetDiscountDays: 10
                              paymentTargetDiscountAmount: 75
                              isPaymentTargetDiscountApplied: true
                            costCenter: CC-2024-001
                            tax:
                              taxation: Domestic
                              vatId: DE123456789
                              taxDisplay: Gross
                        delivery:
                          type: object
                          additionalProperties: false
                          description: Delivery information of the purchase order.
                          properties:
                            deliveryTerms:
                              description: Nullable reference to another resource
                              type: object
                              additionalProperties: false
                              nullable: true
                              required:
                              - id
                              properties:
                                id:
                                  type: string
                                  pattern: \d+
                                  example: '17'
                                  description: Resource identifier.
                              example:
                                id: '1337'
                            hasDifferentDeliveryAddress:
                              type: boolean
                            deliveryAddress:
                              type: object
                              additionalProperties: false
                              description: Delivery address of the purchase order.
                              properties:
                                honorific:
                                  type: string
                                name:
                                  type: string
                                department:
                                  type: string
                                subDepartment:
                                  type: string
                                extraAddressLine:
                                  type: string
                                street:
                                  type: string
                                zipCode:
                                  type: string
                                city:
                                  type: string
                                state:
                                  type: string
                                country:
                                  type: string
                                contactPerson:
                                  type: string
                            dates:
                              type: object
                              additionalProperties: false
                              description: Delivery dates of the purchase order.
                              properties:
                                desiredDeliveryDate:
                                  type: string
                                  format: date
                                  nullable: true
                                confirmedDeliveryDate:
                                  type: string
                                  format: date
                                  nullable: true
                          example:
                            deliveryTerms:
                              id: '1337'
                            hasDifferentDeliveryAddress: true
                            deliveryAddress:
                              honorific: Mr.
                              name: John Doe
                              department: Sales
                              subDepartment: International Sales
                              extraAddressLine: Suite 200
                              street: Main Street 123
                              zipCode: '10115'
                              city: Berlin
                              state: Berlin
                              country: Germany
                              contactPerson: Jane Smith
                            dates:
                              desiredDeliveryDate: '2024-10-15'
                              confirmedDeliveryDate: '2024-10-14'
                        formatting:
                          type: object
                          additionalProperties: false
                          properties:
                            hideLetterHead:
                              type: boolean
                            hidePrices:
                              type: boolean
                            hideProductNumbers:
                              type: boolean
                            showLongProductNumbers:
                              type: boolean
                            hideProductDescriptions:
                              type: boolean
                            showOwnProductNumberInColumn:
                              type: boolean
                          example:
                            hideLetterHead: true
                            hidePrices: false
                            hideProductNumbers: true
                            showLongProductNumbers: false
                            hideProductDescriptions: true
                            showOwnProductNumberInColumn: true
                          description: Formatting settings for the PDF of a purchase order.
                        internalComment:
                          type: string
                          description: Internal Comment about the purchase order.
                          example: Please prioritize this order due to customer request.
                        liabilitiesInfo:
                          type: string
                          description: Information for liabilities.
                          example: This purchase order includes liabilities that must be addressed within 30 days.
                  extra:
                    type: object
                    required:
                    - totalCount
                    - page
                    additionalProperties: false
                    x-description-ignore: true
                    properties:
                      totalCount:
                        description: the total count of all items
                        type: integer
                        example: 1
                      page:
                        description: The pagination object containing the current page number and size
                        type: object
                        required:
                        - number
                        - size
                        additionalProperties: false
                        properties:
                          number:
                            description: The current page number
                            type: integer
                            example: 1
                          size:
                            description: The size of the pages
                            type: integer
                            example: 10
                        example:
                          number: 1
                          size: 10
                    example:
                      totalCount: 1
                      page:
                        number: 1
                        size: 10
        '401':
          description: Unable to authenticate the client
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message explaining why the request failed.
                    example: 'Missing required scopes: customer:create.'
              example:
                message: 'Missing required scopes: customer:create.'
            text/html:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Unable to authorize the client
        '406':
          description: Requested resource representation does not exist.
        '429':
          description: Too many API calls made.
    post:
      tags:
      - Purchase Order
      operationId: purchaseOrder.create
      summary: Create purchase order
      description: Creates a new purchase order.
      parameters: []
      requestBody:
        description: Purchase order create request payload
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - date
              - supplier
              - project
              properties:
                date:
                  type: string
                  format: date
                  description: Date of the purchase order.
                project:
                  description: Reference to another resource
                  type: object
                  additionalProperties: false
                  required:
                  - id
                  properties:
                    id:
                      type: string
                      pattern: \d+
                      example: '17'
                      description: Resource identifier.
                  example:
                    id: '1337'
                supplier:
                  type: object
                  additionalProperties: false
                  required:
                  - id
                  properties:
                    id:
                      type: string
                      pattern: \d+
                      example: '17'
                      description: Resource identifier.
                    honorific:
                      type: string
                    name:
                      type: string
                    department:
                      type: string
                    subDepartment:
                      type: string
                    extraAddressLine:
                      type: string
                    street:
                      type: string
                    zipCode:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                    country:
                      type: string
                    contactPerson:
                      type: string
                    telephone:
                      type: string
                    telefax:
                      type: string
                    email:
                      type: string
                requestForQuotation:
                  description: Reference to another resource
                  type: object
                  additionalProperties: false
                  required:
                  - id
                  properties:
                    id:
                      type: string
                      pattern: \d+
                      example: '17'
                      description: Resource identifier.
                  example:
                    id: '1337'
                bodyIntroduction:
                  type: string
                  description: Text above the position table in the PDF.
                bodyOutroduction:
                  type: string
                  description: Text below the position table in the PDF.
                salesOrderConfirmationReference:
                  type: string
                  description: Reference of the sales order confirmation.
                isConfirmationRequested:
                  type: boolean
                  description: Shows if a confirmation is requested.
                suppliersOfferReference:
                  type: string
                  description: Offer reference of the supplier.
                internalDesignation:
                  type: string
                  description: Internal designation of the purchase order.
                language:
                  type: object
                  additionalProperties: false
                  description: Language of the purchase order.
                  properties:
                    iso2:
                      type: string
                      pattern: '[A-Z]{2}'
                  example:
                    iso2: DE
                isConfirmed:
                  type: boolean
                  description: Shows if the purchase order is confirmed.
                confirmedVia:
                  type: string
                  enum:
                  - Internet
                  - E-Mail
                  - Telephone
                  - Telefax
                  - Letter
                  - Other
                  description: Determines how the purchase order was confirmed.
                financials:
                  type: object
                  additionalProperties: false
                  description: Financial information about the purchase order.
                  properties:
                    paymentMethod:
                      description: Reference to another resource
                      type: object
                      additionalProperties: false
                      required:
                      - id
                      properties:
                        id:
                          type: string
                          pattern: \d+
                          example: '17'
                          description: Resource identifier.
                      example:
                        id: '1337'
                    paymentTerms:
                      type: object
                      additionalProperties: false
                      description: Information about payment terms of the purchase order.
                      properties:
                        paymentTargetDiscount:
                          type: number
                          format: float
                        paymentTargetDays:
                          type: number
                        paymentTargetDiscountDays:
                          type: number
                        paymentTargetDiscountAmount:
                          type: number
                          format: float
                        isPaymentTargetDiscountApplied:
                          type: boolean
                    costCenter:
                      type: string
                      description: The assigned cost center for the purchase order.
                    tax:
                      type: object
                      additionalProperties: false
                      description: Tax information of the purchase order.
                      properties:
                        taxation:
                          type: string
                          enum:
                          - Domestic
                          - EU delivery
       

# --- truncated at 32 KB (115 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/xentral/refs/heads/main/openapi/xentral-purchase-order-api-openapi.yml