Refurbed OrderItemService API

The OrderItemService API from Refurbed — 8 operation(s) for orderitemservice.

Operations 8

POST /refb.merchant.v1.OrderItemService/BatchUpdateOrderItems Batch updates order items. #
POST /refb.merchant.v1.OrderItemService/BatchUpdateOrderItemsState Batch updates order items' state. #
POST /refb.merchant.v1.OrderItemService/CalculateRefundOrderItem Calculate values for a refund of a single order item, i.e. using the RefundOrderItem method. #
POST /refb.merchant.v1.OrderItemService/GetOrderItem Gets a single order item. #
POST /refb.merchant.v1.OrderItemService/ListOrderItemsByOrder Lists all order items of a specific order. #
POST /refb.merchant.v1.OrderItemService/RefundOrderItem Refunds a single order item. Item needs to be refundable. #
POST /refb.merchant.v1.OrderItemService/UpdateOrderItem Updates a single order item. #
POST /refb.merchant.v1.OrderItemService/UpdateOrderItemState Updates the state of a single order item. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/refurbed-orderitemservice-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

refurbed-orderitemservice-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Affiliate Partner BuybackBidService Order Item Service API
  version: '1.0'
  description: The refurbed affiliate partner API allows to retrieve info about markets, products and instances including the buybox info (current price, grading, warranty).
  contact:
    name: Refurbed Affiliate Partner Integrations Team
    email: integrations@refurbed.com
servers:
- url: https://api.refurbed.com
security:
- APIKeyAuth: []
tags:
- name: OrderItemService
paths:
  /refb.merchant.v1.OrderItemService/BatchUpdateOrderItems:
    post:
      summary: Batch updates order items.
      description: "Known errors: Errors are identical to the UpdateOrderItem operation per\neach individual order item update and:\n- INVALID_ARGUMENT\n  - when more than 50 updates are attempted"
      operationId: BatchUpdateOrderItems
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchUpdateOrderItemsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderItemService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchUpdateOrderItemsRequest'
        required: true
  /refb.merchant.v1.OrderItemService/BatchUpdateOrderItemsState:
    post:
      summary: Batch updates order items' state.
      description: "Known errors: Errors are identical to the UpdateOrderItemState operation\nper each individual order item state update and:\n- INVALID_ARGUMENT\n  - when more than 50 updates are attempted"
      operationId: BatchUpdateOrderItemsState
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchUpdateOrderItemsStateResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderItemService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchUpdateOrderItemsStateRequest'
        required: true
  /refb.merchant.v1.OrderItemService/CalculateRefundOrderItem:
    post:
      summary: 'Calculate values for a refund of a single order item, i.e. using the

        RefundOrderItem method.'
      description: "Known errors:\n- UNAUTHENTICATED\n  - when no authorization header is sent\n  - when authorization header is malformed or invalid\n- PERMISSION_DENIED\n  - when the authorized user does not have permissions for this operation\n- NOT_FOUND\n  - when the order item is not found\n- INVALID_ARGUMENT\n  - invalid input refund data is provided\n- FAILED_PRECONDITION\n  - when order item is not refundable\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: CalculateRefundOrderItem
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculateRefundOrderItemResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderItemService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculateRefundOrderItemRequest'
        required: true
  /refb.merchant.v1.OrderItemService/GetOrderItem:
    post:
      summary: Gets a single order item.
      description: "Known errors:\n- UNAUTHENTICATED\n  - when no authorization header is sent\n  - when authorization header is malformed or invalid\n- PERMISSION_DENIED\n  - when the authorized user does not have permissions for this operation\n- NOT_FOUND\n  - when the order item is not found\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: GetOrderItem
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderItemResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderItemService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetOrderItemRequest'
        required: true
  /refb.merchant.v1.OrderItemService/ListOrderItemsByOrder:
    post:
      summary: Lists all order items of a specific order.
      description: "Known errors:\n- UNAUTHENTICATED\n  - when no authorization header is sent\n  - when authorization header is malformed or invalid\n- PERMISSION_DENIED\n  - when the authorized user does not have permissions for this operation\n- INVALID_ARGUMENT\n  - when pagination limit is too large (>100)\n  - when both \"ending_before\" and \"starting_after\" are specified in pagination\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: ListOrderItemsByOrder
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrderItemsByOrderResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderItemService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOrderItemsByOrderRequest'
        required: true
  /refb.merchant.v1.OrderItemService/RefundOrderItem:
    post:
      summary: Refunds a single order item. Item needs to be refundable.
      description: "Known errors:\n- UNAUTHENTICATED\n  - when no authorization header is sent\n  - when authorization header is malformed or invalid\n- PERMISSION_DENIED\n  - when the authorized user does not have permissions for this operation\n- NOT_FOUND\n  - when the order item is not found\n- INVALID_ARGUMENT\n  - invalid input refund data is provided\n- FAILED_PRECONDITION\n  - when order item is not refundable\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: RefundOrderItem
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundOrderItemResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderItemService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundOrderItemRequest'
        required: true
  /refb.merchant.v1.OrderItemService/UpdateOrderItem:
    post:
      summary: Updates a single order item.
      description: "Known errors:\n- UNAUTHENTICATED\n  - when no authorization header is sent\n  - when authorization header is malformed or invalid\n- PERMISSION_DENIED\n  - when the authorized user does not have permissions for this operation\n- NOT_FOUND\n  - when the updated order item is not found\n- INVALID_ARGUMENT\n  - when invalid parcel tracking url is provided\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: UpdateOrderItem
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateOrderItemResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderItemService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrderItemRequest'
        required: true
  /refb.merchant.v1.OrderItemService/UpdateOrderItemState:
    post:
      summary: Updates the state of a single order item.
      description: "Known errors:\n- UNAUTHENTICATED\n  - when no authorization header is sent\n  - when authorization header is malformed or invalid\n- PERMISSION_DENIED\n  - when the authorized user does not have permissions for this operation\n- NOT_FOUND\n  - when the updated order item is not found\n- INVALID_ARGUMENT\n  - when illegal state transition is attempted\n  - when no parcel tracking url is set when transitioning to SHIPPED state\n  - when invalid parcel tracking url is provided\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: UpdateOrderItemState
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateOrderItemStateResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderItemService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrderItemStateRequest'
        required: true
components:
  schemas:
    ListOrderItemsByOrderRequest.Filter.OrderItemNameFilter:
      type: object
      properties:
        matches:
          type:
          - string
          - 'null'
    CurrencyCodeFilter:
      type: object
      properties:
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/CurrencyCode'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/CurrencyCode'
    Status:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
        message:
          type: string
          description: 'A developer-facing error message, which should be in English. Any

            user-facing error message should be localized and sent in the

            [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.'
        details:
          type: array
          items:
            $ref: '#/components/schemas/Any'
          description: 'A list of messages that carry the error details.  There is a common set of

            message types for APIs to use.'
      description: 'The `Status` type defines a logical error model that is suitable for

        different programming environments, including REST APIs and RPC APIs. It is

        used by [gRPC](https://github.com/grpc). Each `Status` message contains

        three pieces of data: error code, error message, and error details.


        You can find out more about this error model and how to work with it in the

        [API Design Guide](https://cloud.google.com/apis/design/errors).'
    ListOrderItemsByOrderResponse:
      type: object
      properties:
        order_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
          description: The order items found.
        has_more:
          type: boolean
          description: Indicates whether there are more results available.
    BatchUpdateOrderItemsStateResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/BatchUpdateOrderItemsStateResponse.Result'
          description: Results of the update operation. In request order.
    OrderItemState:
      type: string
      enum:
      - UNSPECIFIED
      - NEW
      - REJECTED
      - CANCELLED
      - ACCEPTED
      - SHIPPED
      - RETURNED
      default: UNSPECIFIED
      description: " - NEW: Order item was not handled yet. Next states: REJECTED, CANCELLED or\nACCEPTED.\n - REJECTED: Order item cannot be fulfilled. Final state.\n - CANCELLED: Order item was cancelled by the customer. Is like REJECTED but was\nrequested by the customer. Final state.\n - ACCEPTED: Order item was accepted for fulfillment. Next states: CANCELLED or\nSHIPPED.\n - SHIPPED: Order item was shipped. The parcel tracking link needs to be set for this\nstate to be set. The item identifier should be set, if possible. Possible\nfinal state. Next possible state, if necessary: RETURNED.\n - RETURNED: Order item was returned by the customer. Final state."
    GetOrderItemResponse:
      type: object
      properties:
        order_item:
          $ref: '#/components/schemas/OrderItem'
    ListOrderItemsByOrderRequest.Filter:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Int64Filter'
        name:
          $ref: '#/components/schemas/ListOrderItemsByOrderRequest.Filter.OrderItemNameFilter'
        state:
          $ref: '#/components/schemas/OrderItemStateFilter'
        sku:
          $ref: '#/components/schemas/OfferSKUFilter'
        currency_code:
          $ref: '#/components/schemas/CurrencyCodeFilter'
        settlement_currency_code:
          $ref: '#/components/schemas/CurrencyCodeFilter'
        total_charged:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_total_charged:
          $ref: '#/components/schemas/NumericRangeFilter'
        total_charged_dynamic:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_total_charged_dynamic:
          $ref: '#/components/schemas/NumericRangeFilter'
        total_paid:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_total_paid:
          $ref: '#/components/schemas/NumericRangeFilter'
        total_refunded:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_total_refunded:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_total_commission:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_base_commission:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_payout_commission:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_payment_commission:
          $ref: '#/components/schemas/NumericRangeFilter'
        settlement_dynamic_commission:
          $ref: '#/components/schemas/NumericRangeFilter'
        taxation:
          $ref: '#/components/schemas/OrderItemTaxationFilter'
        is_refundable:
          $ref: '#/components/schemas/BoolFilter'
        is_parcel_tracking_url:
          $ref: '#/components/schemas/BoolFilter'
        is_item_identifier:
          $ref: '#/components/schemas/BoolFilter'
        linked_offer_data_offer_id:
          $ref: '#/components/schemas/Int64Filter'
        linked_offer_data_offer_warranty:
          $ref: '#/components/schemas/OfferWarrantyFilter'
        linked_offer_data_offer_grading:
          $ref: '#/components/schemas/OfferGradingFilter'
        linked_offer_data_shipping_profile_id:
          $ref: '#/components/schemas/Int64Filter'
    BatchUpdateOrderItemsStateRequest.Update:
      type: object
      properties:
        id:
          type: string
          format: int64
          description: The id of the order item to refund.
          required:
          - id
        state:
          $ref: '#/components/schemas/OrderItemState'
        parcel_tracking_url:
          type:
          - string
          - 'null'
          description: Must be a valid HTTP(S) URL. Cannot be unset, can be overwritten with valid value.
        item_identifier:
          type:
          - string
          - 'null'
          description: 'IMEI (if smartphone) or serial number (other product categories) of the

            item shipped.

            Deprecated: use item_identifiers field instead.'
        item_identifiers:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemIdentifier'
        weight_kg:
          type:
          - number
          - 'null'
          format: float
          description: Net weight of this item, in kilograms.
        manufacturing_country:
          $ref: '#/components/schemas/CountryCode'
          description: Country where the item was manufactured.
        hs_code:
          type:
          - string
          - 'null'
          description: 'HS (Harmonized System) code for customs classification.


            e.g. 8517.1300 for iPhones'
        parcel_carrier_tracking_number:
          $ref: '#/components/schemas/CarrierTrackingNumber'
          description: Carrier + tracking number pair.
      required:
      - id
    Any:
      type: object
      properties:
        '@type':
          type: string
          description: "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
      additionalProperties: {}
      description: "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"
    OrderItemTaxation:
      type: string
      enum:
      - UNSPECIFIED
      - GROSS
      - MARGINAL
      - NET
      default: UNSPECIFIED
    OfferData:
      type: object
      properties:
        offer_id:
          type: string
          format: int64
        offer_version:
          type: string
          format: int64
        offer_order_exchange_rate:
          type: string
          description: 'Exchange rate applied to convert amounts from offer currency to order

            currency.'
        offer_warranty:
          $ref: '#/components/schemas/OfferWarranty'
          description: The offer warranty.
        offer_grading:
          $ref: '#/components/schemas/OfferGrading'
          description: The offer grading.
        shipping_profile_id:
          type: string
          format: int64
        shipping_profile_version:
          type:
          - string
          - 'null'
          format: int64
          description: 'Shipping profiles on old orders do not have proper version information

            attached to them. This is only set for newer orders.'
        shipping_costs:
          type: string
          description: The shipping costs, in order currency.
        battery_condition:
          $ref: '#/components/schemas/BatteryCondition'
    GetOrderItemRequest:
      type: object
      properties:
        id:
          type: string
          format: int64
          description: The id of the order item to get.
          required:
          - id
      required:
      - id
    ListOrderItemsByOrderRequest.Sort:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/SortOrder'
        by:
          $ref: '#/components/schemas/ListOrderItemsByOrderRequest.Sort.By'
    UpdateOrderItemStateResponse:
      type: object
      properties:
        order_item:
          $ref: '#/components/schemas/OrderItem'
    SortOrder:
      type: string
      enum:
      - ASC
      - DESC
      default: ASC
    Int64Pagination:
      type: object
      properties:
        limit:
          type:
          - integer
          - 'null'
          format: int64
          description: 'Limit on the number of results to be returned. Between 1 and 100.

            Default and maximum is 100.'
        ending_before:
          type: string
          format: int64
        starting_after:
          type: string
          format: int64
      description: Paginates resources with int64 primary key.
    OrderItemIdentifierType:
      type: string
      enum:
      - UNSPECIFIED
      - IMEI
      - SERIAL_NUMBER
      default: UNSPECIFIED
    CarrierTrackingNumber:
      type: object
      properties:
        carrier:
          type: string
          description: Carrier slug, obtained from ListAvailableCarriers RPC.
        tracking_number:
          type: string
          description: Tracking number belonging to that carrier.
    BatchUpdateOrderItemsResponse.Result:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/Status'
        order_item:
          $ref: '#/components/schemas/OrderItem'
          description: Updated order item. Set if status code is OK.
    OrderItemStateFilter:
      type: object
      properties:
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemState'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemState'
    OrderItemIdentifier:
      type: object
      properties:
        identifier_type:
          $ref: '#/components/schemas/OrderItemIdentifierType'
        value:
          type: string
    OfferWarrantyFilter:
      type: object
      properties:
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/OfferWarranty'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/OfferWarranty'
    OfferGrading:
      type: string
      enum:
      - UNSPECIFIED
      - A
      - B
      - C
      - AA
      default: UNSPECIFIED
      description: 'The grading of the item being sold.


        Please consult the refurbed seller guide and quality charta to learn about

        refurbed''s grading requirements.'
    RefundOrderItemRequest:
      type: object
      properties:
        id:
          type: string
          format: int64
          description: The id of the order item to refund.
          required:
          - id
        currency_code:
          $ref: '#/components/schemas/CurrencyCode'
          description: Currency to refund. This needs to match the order / order item currency.
        target_paid_amount:
          type: string
          description: 'The desired paid amount of this order item. Example: if the customer paid

            100EUR and the merchant wants to refund 10EUR, the target-paid-amount would

            be 90. 0 for a full refund.'
          required:
          - target_paid_amount
      required:
      - id
      - target_paid_amount
    ListOrderItemsByOrderRequest:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Int64Pagination'
        sort:
          $ref: '#/components/schemas/ListOrderItemsByOrderRequest.Sort'
        filter:
          $ref: '#/components/schemas/ListOrderItemsByOrderRequest.Filter'
        order_id:
          type: string
          format: int64
          required:
          - order_id
      required:
      - order_id
    OrderItemTaxationFilter:
      type: object
      properties:
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemTaxation'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemTaxation'
    CalculateRefundOrderItemResponse:
      type: object
      properties:
        currency_code:
          $ref: '#/components/schemas/CurrencyCode'
          description: Currency of the refund. This matches the order / order item currency.
        total_paid:
          type: string
          description: New total paid of the order item.
        total_refunded:
          type: string
          description: Total refunded amount.
        refunded:
          type: string
          description: Refunded amount.
        refunded_refurbed:
          type: string
          description: Part that refurbed refunded.
        refunded_merchant:
          type: string
          description: Part that the merchant refunded.
    OfferGradingFilter:
      type: object
      properties:
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/OfferGrading'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/OfferGrading'
    RefundEligibility:
      type: string
      enum:
      - UNSPECIFIED
      - ELIGIBLE
      - INELIGIBLE_UNKNOWN
      - INELIGIBLE_PERIOD_EXPIRED
      - INELIGIBLE_ALREADY_REFUNDED
      - INELIGIBLE_UNCAPTURED_PAYMENT
      - INELIGIBLE_NO_TICKET
      default: UNSPECIFIED
      description: " - ELIGIBLE: Refunds are allowed.\n - INELIGIBLE_UNKNOWN: Refunds are not allowed for an unspecified reason.\n - INELIGIBLE_PERIOD_EXPIRED: Refunds are not allowed because the order was created long ago.\n - INELIGIBLE_ALREADY_REFUNDED: Refunds are not allowed because everything the customer paid has already been refunded.\n - INELIGIBLE_UNCAPTURED_PAYMENT: Refunds are not allowed because Refurbed doesn't have the payment guaranteed yet.\n - INELIGIBLE_NO_TICKET: Refunds are not allowed because no relevant Zendesk ticket exists."
    BatchUpdateOrderItemsStateResponse.Result:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/Status'
        order_item:
          $ref: '#/components/schemas/OrderItem'
          description: Updated order item. Set if status code is OK.
    OrderItem:
      type: object
      properties:
        id:
          type: string
          format: int64
          description: Primary key.
        order_id:
          type: string
          format: int64
          description: ID of the order this item belongs to.
        name:
          type: string
          description: Human-readable name of the item sold.
        state:
          $ref: '#/components/schemas/OrderItemState'
          description: State of this item.
        sku:
          type: string
          description: 'Merchant SKU of the item. This can be empty string as it is/was possible

            for the merchant to create offers without SKU in the refurbed merchant

            management interface.'
        currency_code:
          $ref: '#/components/schemas/CurrencyCode'
          description: 'Currency the order item was charged in. Is always equal to the currency

            of the order.'
        settlement_currency_code:
          $ref: '#/components/schemas/CurrencyCode'
          description: 'Currency the order item was settled it. This is the currency the merchant will

            be paid out in. Is always equal to the settlement currency of the order.'
        total_charged:
          type: string
          description: 'The total amount the customer was charged for this item, in order

            currency. This is the sum of total paid and total refunded.'
        settlement_total_charged:
          type: string
          description: 'The total amount the customer was charged for this item, in order

            settlement currency.'
        total_discount:
          type: string
          description: Discount amount if coupon was applied to the order.
        settlement_total_discount:
          type: string
          description: Discount amount if coupon was applied to the order, in settlement currency.
        total_charged_dynamic:
          type: string
          description: 'The dynamic price part of the amount the customer was charged

            ("dynamic pricing").'
        settlement_total_charged_dynamic:
          type: string
          description: 'The dynamic price part of the amount the customer was charged, in order

            settlement currency.'
        total_paid:
          type: string
          description: 'The total amount the customer paid for this item plus discount value, in order currency. This

            value decreases on refund.'
        settlement_total_paid:
          type: string
          description: The total amount the customer paid for this item plus discount value, in order settlement currency.
        total_refunded:
          type: string
          description: The total amount the customer was refunded, in order currency.
        settlement_total_refunded:
          type: string
          description: The total amount the customer was refunded, in order settlement currency.
        settlement_total_commission:
          type: string
          description: Total commission paid by the merchant, in order settlement currency.
        settlement_base_commission:
          type: string
          description: Base commission paid by the merchant, in order settlement currency.
        settlement_payout_commission:
          type: string
          description: Payout commission paid by the merchant, in order settlement currency.
        settlement_payment_commission:
          type: string
          description: Payment commission paid by the merchant, in order settlement currency.
        settlement_dynamic_commission:
          type: string
          description: 'Dynamic commission paid by the merchant (commission of the dynamic part),

            in order settlem

# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/refurbed/refs/heads/main/openapi/refurbed-orderitemservice-api-openapi.yml