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

# Create order events

> Create new order events



## OpenAPI

````yaml /api-reference/openapi.yaml post /v2/order_events
openapi: 3.1.0
info:
  title: Public Imprint API
  version: '2.0'
servers:
  - url: https://dev.sbx.imprint.co
    description: Imprint public api sandbox
security:
  - basicAuth: []
  - bearerAuth: []
paths:
  /v2/order_events:
    post:
      tags:
        - Order Events
      summary: Create order events
      description: Create new order events
      operationId: postOrderEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderEventBase'
      responses:
        '200':
          description: Order event created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderEvent'
components:
  schemas:
    OrderEventBase:
      type: object
      required:
        - order_id
        - type
        - amount
        - network_transaction_id
      properties:
        order_event_id:
          type: string
          description: The ID of the order event
          example: 77f60af4-185e-4867-b113-34e3cf7c6acd
        order_id:
          type: string
          description: The ID of the order to which the event is related
          example: 77f60af4-185e-4867-b113-34e3cf7c6acd
        partner_event_id:
          type: string
          description: Partner's event identifier
          example: 7622c07d-eb2b-4345-a9a9-345d61d32bc2
        type:
          type: string
          enum:
            - CAPTURED
            - REFUNDED
          description: Type of order event
          example: CAPTURED
        amount:
          allOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - example: 274999
              description: Total event amount ($2,699.99 + $50.00)
        rewards_amount:
          allOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - example: 2500
              description: Total rewards amount for the event ($25 + $0)
        currency:
          type: string
          description: >-
            The 3-character currency code of the amount in ISO 4217 format
            (e.g., "USD")
          example: USD
        network_transaction_id:
          type: string
          description: Card network transaction identifier
          example: 615e3ba0-6b99-495b-ade4-1f584c40f376
        order_lines:
          type: array
          items:
            $ref: '#/components/schemas/OrderLine'
          description: >-
            When provided, the API will require that the calculated sum of all
            the rates and rewards rates within (taking quantities into account)
            are equal to the `amount` and `rewards_amount`, respectively.

            It is important to note that the sums of all *event* amounts and
            *event* rewards amounts belonging to an order do not need to be
            equal to `total_order_amount` and `total_rewards_amount` in the
            order, as the data contained in events will serve as the final
            source of truth for the lifecycle of the order, as it actually
            transpired.
          example:
            - name: Couch Supreme
              product_url: www.restassured.com/couch-supreme
              quantity: 1
              rate: 274999
              rewards_rate: 2500
    OrderEvent:
      allOf:
        - $ref: '#/components/schemas/OrderEventBase'
    CurrencyAmount:
      type: number
      format: iso-4217
    OrderLine:
      type: object
      required:
        - name
        - quantity
        - rate
        - rewards_rate
      properties:
        name:
          type: string
          description: Name of the order line item
          example: Couch Supreme
        product_url:
          type: string
          nullable: true
          description: URL to the product
          example: www.restassured.com/couch-supreme
        quantity:
          type: integer
          description: Quantity of the item
          example: 1
        rate:
          allOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - example: 274999
        rewards_rate:
          allOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - example: 2500
  securitySchemes:
    bearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers-- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http

````