> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kibocommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Purchase Order Transaction

> Creates a purchase order transaction log (for public api use).



## OpenAPI

````yaml /openapi/openapi_customer.json post /commerce/customer/accounts/{accountId}/PurchaseOrderTransaction
openapi: 3.0.1
info:
  description: |-
    <div id="overview_CUSTOMER">
                <h2>CUSTOMER</h2>
                <p>The Customer API manages a customer's information, including their billing and shipping address
                    information,
                    contact information, order history, lifetime value, and more. It allows for customers to be grouped into
                    sets
                    to control the specific sites they can access using the same login credentials, as well as supports the
                    B2B
                    commerce feature that includes a hierarchy of customer accounts. For more information about customer management and the Unified Commerce Admin UI, see the <a href="/pages/b2c">general</a> and <a href="/pages/b2b">B2B</a> customers guides.</p>
                <p>Use the <strong>B2B</strong> and <strong>Customer Accounts</strong> resources to manage the components of shopper accounts, including
                    attributes, contact information, company notes, and groups associated with the customer account.</p>
                <p>Use the <strong>Address Validation</strong> resource to validate addresses associated with a customer account contact.</p>
                <p><strong>Customer Attributes</strong> are custom attributes that you can apply to customer accounts to add further
                    definition for special uses, such as marketing campaigns, or discounts. Refer to the <a href="/pages/customer-attributes">Customer
                        Attributes user guide</a> for more information.</p>
                <p>Use the <strong>Customer Credits</strong> resource to manage the store credit associated with a customer account. Store
                    credit can represent a static amount the customer can redeem at any of the tenant's sites, or a gift
                    card registered for a customer account. At this time, gift card functionality is reserved for future
                    use.</p>
                <p>Use the <strong>Customer Segments</strong> resource to manage groups of customers and target discounts for these segments. After a customer segment is defined, you can
                    associate any number of customer accounts with it. Meanwhile, the <strong>Customer Sets</strong> resource controls the specific sites your customers can access using the same
                    login credentials, as well as what My Account storefront customer information is shared between sites.</p>
                <p>Use the <strong>Visits</strong> resource to manage all visits a customer makes to a tenant's sites and measure the level
                    of transactions a customer performs during a unique visit for customer account analytics. Track customer
                    visits by site (including online and in-person interactions), the transactions a customer performs
                    during the visit, and the device type associated with the visit, if any.</p>
                <p>Use the <strong>Customer In-Stock Notification Subscription</strong> resource to manage the subscriptions customer
                    accounts use to send product notifications. This resource can send a notification when a product in a
                    catalog returns to a site's active inventory after it is out of stock, or when a new product becomes
                    available for the first time. (Not supported for bundled products.)</p>
                <p>Use the <strong>Storefront Auth Ticket</strong> resource to generate and refresh authentication tickets for
                    customer accounts.</p>
            </div>
  title: Customer
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
paths:
  /commerce/customer/accounts/{accountId}/PurchaseOrderTransaction:
    post:
      tags:
        - CustomerAccount
      summary: Create Purchase Order Transaction
      description: Creates a purchase order transaction log (for public api use).
      parameters:
        - description: Unique identifier of the customer account.
          in: path
          name: accountId
          required: true
          schema:
            format: int32
            type: integer
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderTransaction'
        description: transaction log that needs to be created
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseOrderTransaction'
            text/json:
              schema:
                $ref: '#/components/schemas/PurchaseOrderTransaction'
            text/plain:
              schema:
                $ref: '#/components/schemas/PurchaseOrderTransaction'
          description: OK
components:
  schemas:
    PurchaseOrderTransaction:
      description: Customer purchase order transaction log
      properties:
        additionalTransactionDetail:
          description: Any additional transaction detail other than transaction description
          nullable: true
          type: string
        auditInfo:
          $ref: '#/components/schemas/AdminUserAuditInfo'
        author:
          nullable: true
          type: string
        availableBalance:
          description: Current available balance on Purchase Order account
          format: double
          type: number
        creditLimit:
          description: Maximum credit available on a purchase order account
          format: double
          type: number
        customerPurchaseOrderAccountId:
          description: Unique identifier for Customer purchase order account
          format: int32
          type: integer
        externalId:
          nullable: true
          type: string
        orderId:
          description: Unique identifier for an order
          nullable: true
          type: string
        purchaseOrderNumber:
          description: Purchase order number
          nullable: true
          type: string
        siteId:
          description: Site Id associated with transaction log
          format: int32
          type: integer
        tenantId:
          description: Tenant Id associated with transaction log
          format: int32
          type: integer
        transactionAmount:
          description: Transaction amount in transaction log for a purchase order account
          format: double
          type: number
        transactionDate:
          description: Date when the transaction was made on a purchase order account
          format: date-time
          type: string
        transactionDescription:
          description: |-
            Purchase Order transaction description
            Line of Credit Change
            Order Submitted
            Payment Collected
            Payment Voided
            Payment Refund
            Manual Adjustment
          nullable: true
          type: string
        transactionTypeId:
          description: |2-
             Purchase Order transaction type
            1 - Line of Credit Change
            2 - Order Submitted
            3 - Payment Collected
            4 - Payment Voided
            5 - Payment Refund
            6 - Manual Adjustment
          format: int32
          type: integer
      type: object
    AdminUserAuditInfo:
      properties:
        createBy:
          nullable: true
          type: string
        createDate:
          format: date-time
          nullable: true
          type: string
        updateBy:
          nullable: true
          type: string
        updateDate:
          format: date-time
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````