Refurbed OrderService API

The OrderService API from Refurbed — 13 operation(s) for orderservice.

OpenAPI Specification

refurbed-orderservice-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Affiliate Partner BuybackBidService OrderService 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
host: api.refurbed.com
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- APIKeyAuth: []
tags:
- name: OrderService
paths:
  /refb.merchant.v1.OrderService/CalculateRefundOrder:
    post:
      summary: 'Calculate values for a refund of all refundable items of an order at once,

        i.e. using the RefundOrder 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 is not found\n- INVALID_ARGUMENT\n  - invalid input refund data is provided\n- FAILED_PRECONDITION\n  - when order is not refundable\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: CalculateRefundOrder
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/CalculateRefundOrderResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/CalculateRefundOrderRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/CreateShippingLabel:
    post:
      summary: Creates shipping label for an 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- NOT_FOUND\n  - when the order is not found\n  - when merchant address is not found\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: CreateShippingLabel
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/CreateShippingLabelResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/CreateShippingLabelRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/DeleteOrderCommercialInvoice:
    post:
      summary: Deletes the previously uploaded commercial invoice for an 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- NOT_FOUND\n  - when the order is not found\n  - when the commercial invoice was not uploaded\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: DeleteOrderCommercialInvoice
      responses:
        '200':
          description: A successful response.
          schema:
            properties: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/DeleteOrderCommercialInvoiceRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/DeleteOrderInvoice:
    post:
      summary: 'Deletes the order''s invoice. Order needs to be

        invoiceable.'
      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 is not found for the merchant\n  - when no invoice is found in the order\n- FAILED_PRECONDITION\n  - when the order is not invoiceable\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: DeleteOrderInvoice
      responses:
        '200':
          description: A successful response.
          schema:
            properties: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/DeleteOrderInvoiceRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/GetOrder:
    post:
      summary: Gets a single order using its identifier.
      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 is not found\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: GetOrder
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/GetOrderResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/GetOrderRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/GetOrderCommercialInvoice:
    post:
      summary: Returns the previously uploaded commercial invoice for an 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- NOT_FOUND\n  - when the order is not found\n  - when the commercial invoice was not uploaded\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: GetOrderCommercialInvoice
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/GetOrderCommercialInvoiceResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/GetOrderCommercialInvoiceRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/GetOrderInvoice:
    post:
      summary: Gets the order's invoice. The URL access token is valid for 24h.
      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 is not found for the merchant\n  - when no invoice is found in the order\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: GetOrderInvoice
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/GetOrderInvoiceResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/GetOrderInvoiceRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/ListOrders:
    post:
      summary: Lists orders.
      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: ListOrders
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/ListOrdersResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/ListOrdersRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/ListShippingLabels:
    post:
      summary: Lists shipping labels for an 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- NOT_FOUND\n  - when the order is not found\n  - when merchant address is not found\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: ListShippingLabels
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/ListShippingLabelsResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/ListShippingLabelsRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/RefundOrder:
    post:
      summary: Refunds all refundable items of an order at once.
      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 is not found\n- INVALID_ARGUMENT\n  - invalid input refund data is provided\n- FAILED_PRECONDITION\n  - when order is not refundable\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: RefundOrder
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/RefundOrderResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/RefundOrderRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/SetOrderInvoiceStream:
    post:
      summary: Uploads an invoice for an order.
      description: "Overrides a possibly already existing invoice. Order needs to be\ninvoiceable.\n\nKnown 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 is not found for the merchant\n- FAILED_PRECONDITION\n  - when the invoice exceeds the permitted size\n  - when the order is not invoiceable\n- INVALID_ARGUMENT\n  - when the invoice format is not supported\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: SetOrderInvoiceStream
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/SetOrderInvoiceResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        description: ' (streaming inputs)'
        in: body
        required: true
        schema:
          $ref: '#/definitions/SetOrderInvoiceRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/UpdateShippingLabelAddress:
    post:
      summary: Updates the shipping label address for an order.
      description: "The shipping label address is used when creating shipping labels. This is\nuseful when the carrier rejects the original customer address and the merchant\nneeds to correct it.\n\nKnown 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- FAILED_PRECONDITION\n  - when shipping label address is not enabled for the merchant\n- NOT_FOUND\n  - when the order is not found\n- INVALID_ARGUMENT\n  - when address fields are invalid\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: UpdateShippingLabelAddress
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/UpdateShippingLabelAddressResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/UpdateShippingLabelAddressRequest'
      tags:
      - OrderService
  /refb.merchant.v1.OrderService/UploadOrderCommercialInvoice:
    post:
      summary: Uploads a commercial invoice for an order.
      description: "This document is required for customs when shipping internationally (e.g., outside the EU), and must be provided\nbefore shipping the order. The document must be in PDF.\nIntra-EU orders (e.g., non-CH orders) are not eligible for commercial invoice upload.\nIf a commercial invoice was already uploaded, the call will return an error.\n\nKnown 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 is not found\n- FAILED_PRECONDITION\n  - when the order is not eligible for commercial invoice upload\n  - when a commercial invoice was already uploaded for the order\n- INVALID_ARGUMENT\n  - when the commercial invoice format is not supported\n  - when the commercial invoice exceeds the permitted size\n- RESOURCE_EXHAUSTED\n  - when rate limit is exceeded"
      operationId: UploadOrderCommercialInvoice
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/UploadOrderCommercialInvoiceResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Status'
      parameters:
      - name: body
        description: ' (streaming inputs)'
        in: body
        required: true
        schema:
          $ref: '#/definitions/UploadOrderCommercialInvoiceRequest'
      tags:
      - OrderService
definitions:
  UpdateShippingLabelAddressRequest.Address:
    type: object
    properties:
      first_name:
        type: string
        required:
        - first_name
      family_name:
        type: string
        required:
        - family_name
      company:
        type: string
        x-nullable: true
      street_name:
        type: string
        required:
        - street_name
      house_no:
        type: string
        x-nullable: true
      supplement:
        type: string
        x-nullable: true
      town:
        type: string
        required:
        - town
      post_code:
        type: string
        required:
        - post_code
      country_code:
        $ref: '#/definitions/CountryCode'
      phone:
        type: string
        required:
        - phone
    required:
    - first_name
    - family_name
    - street_name
    - town
    - post_code
    - phone
  TrackingData:
    type: object
    properties:
      carrier:
        type: string
      tracking_number:
        type: string
      tracking_url:
        type: string
  CalculateRefundOrderResponse:
    type: object
    properties:
      currency_code:
        $ref: '#/definitions/CurrencyCode'
        description: Currency of the refund. This matches the order / order item currency.
      total_paid:
        type: string
        description: New total paid of the order.
      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.
  AddressEntity:
    type: string
    enum:
    - UNSPECIFIED
    - MALE
    - FEMALE
    - COMPANY
    default: UNSPECIFIED
  NumericRangeFilter:
    type: object
    properties:
      gt:
        type: string
        x-nullable: true
      ge:
        type: string
        x-nullable: true
      any_of:
        type: array
        items:
          type: string
      none_of:
        type: array
        items:
          type: string
      le:
        type: string
        x-nullable: true
      lt:
        type: string
        x-nullable: true
    description: 'Numeric range filter is used for decimal numbers. It is especially

      used for monetary amounts and other quantities where exactness is required.'
  OrderStateFilter:
    type: object
    properties:
      any_of:
        type: array
        items:
          $ref: '#/definitions/OrderState'
      none_of:
        type: array
        items:
          $ref: '#/definitions/OrderState'
  Int64Pagination:
    type: object
    properties:
      limit:
        type: integer
        format: int64
        x-nullable: true
        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.
  DeleteOrderInvoiceRequest:
    type: object
    properties:
      order_id:
        type: string
        format: int64
        required:
        - order_id
    required:
    - order_id
  OfferWarranty:
    type: string
    enum:
    - UNSPECIFIED
    - M12
    - M18
    - M24
    - M30
    - M36
    default: UNSPECIFIED
    description: "The warranty the merchant provides to the customer. Only 12 months is supported.\n\n - M12: 12 months.\n - M18: 18 months, deprecated. Only 12 months is supported for new offers.\n - M24: 24 months, deprecated. Only 12 months is supported for new offers.\n - M30: 30 months, deprecated. Only 12 months is supported for new offers.\n - M36: 36 months, deprecated. Only 12 months is supported for new offers."
  OrderState:
    type: string
    enum:
    - UNSPECIFIED
    - NEW
    - REJECTED
    - CANCELLED
    - ACCEPTED
    - SHIPPED
    - RETURNED
    - FULFILLED
    - UNFULFILLED
    - PARTIALLY_FULFILLED
    default: UNSPECIFIED
    description: "Order states are calculated based on the individual order item states.\n\n - NEW: Order was not handled yet. At least one order item has state NEW.\n - REJECTED: Order was rejected (cannot be fulfilled). All order items have state\nREJECTED.\n - CANCELLED: Order was cancelled. All order items have state CANCELLED.\n - ACCEPTED: Order was accepted. At least one order item has state ACCEPTED, and none\nof the other items still have state NEW.\n - SHIPPED: Order was fully shipped. All order items have state SHIPPED.\n - RETURNED: Order was fully returned. All order items have state RETURNED.\n - FULFILLED: Order was fulfilled. Order has only items with both SHIPPED and RETURNED.\n - UNFULFILLED: Order was unfulfilled. Order has only items with both REJECTED and CANCELLED.\n - PARTIALLY_FULFILLED: Order was partially fulfilled. Order has items with both fulfilled (SHIPPED, RETURNED)\nand unfulfilled (REJECTED, CANCELLED) states."
  SetOrderInvoiceRequest.Meta:
    type: object
    properties:
      order_id:
        type: string
        format: int64
        required:
        - order_id
    required:
    - order_id
  ListOrdersRequest.Sort.By:
    type: string
    enum:
    - ID
    - RELEASED_AT
    - CUSTOMER_EMAIL
    - CURRENCY_CODE
    - SETTLEMENT_CURRENCY_CODE
    - TOTAL_CHARGED
    - SETTLEMENT_TOTAL_CHARGED
    - TOTAL_PAID
    - SETTLEMENT_TOTAL_PAID
    - TOTAL_REFUNDED
    - SETTLEMENT_TOTAL_REFUNDED
    default: ID
  RefundOrderRequest:
    type: object
    properties:
      id:
        type: string
        format: int64
        description: The id of the order to fully refund.
        required:
        - id
    required:
    - id
  GetOrderCommercialInvoiceRequest:
    type: object
    properties:
      order_id:
        type: string
        format: int64
        required:
        - order_id
    required:
    - order_id
  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.'
  OrderAddressFilter:
    type: object
    properties:
      matches:
        type: string
        x-nullable: true
  BoolFilter:
    type: object
    properties:
      value:
        type: boolean
        x-nullable: true
  UpdateShippingLabelAddressRequest:
    type: object
    properties:
      order_id:
        type: string
        format: int64
        required:
        - order_id
      address:
        $ref: '#/definitions/UpdateShippingLabelAddressRequest.Address'
    required:
    - order_id
  AddressEntityFilter:
    type: object
    properties:
      any_of:
        type: array
        items:
          $ref: '#/definitions/AddressEntity'
      none_of:
        type: array
        items:
          $ref: '#/definitions/AddressEntity'
  GetOrderRequest:
    type: object
    properties:
      id:
        type: string
        format: int64
        description: The id of the order to get.
        required:
        - id
    required:
    - id
  UploadOrderCommercialInvoiceRequest.Meta:
    type: object
    properties:
      order_id:
        type: string
        format: int64
        title: Order ID
        required:
        - order_id
      commercial_invoice_number:
        type: string
        title: Commercial invoice number, as indicated on the document
        required:
        - commercial_invoice_number
    required:
    - order_id
    - commercial_invoice_number
  SetOrderInvoiceRequest:
    type: array
    format: array
    example:
    - meta:
        order_id: '123'
    - data: base64encodedbinary
    properties:
      meta:
        $ref: '#/definitions/SetOrderInvoiceRequest.Meta'
      data:
        type: string
        format: byte
        description: File data in PDF format. Can be at most 1MB (1024^2 bytes).
    description: 'Send first message with Meta set, then other messages with chunked data to stream.

      Max total data size is 2MB (2 * 1024^2 bytes).'
  GetOrderInvoiceRequest:
    type: object
    properties:
      order_id:
        type: string
        format: int64
        required:
        - order_id
    required:
    - order_id
  UploadOrderCommercialInvoiceResponse:
    type: object
    properties:
      size:
        type: string
        format: int64
        description: Size of uploaded invoice in bytes.
      url:
        type: string
        description: URL to invoice file. This will expire.
      commercial_invoice_number:
        type: string
        description: Commercial invoice number, as indicated on the document.
  OrderItemTaxation:
    type: string
    enum:
    - UNSPECIFIED
    - GROSS
    - MARGINAL
    - NET
    default: UNSPECIFIED
  CountryCodeFilter:
    type: object
    properties:
      any_of:
        type: array
        items:
          $ref: '#/definitions/CountryCode'
      none_of:
        type: array
        items:
          $ref: '#/definitions/CountryCode'
  CarrierEnum.Carrier:
    type: string
    enum:
    - UNSPECIFIED
    - UPS
    - DHL_EXPRESS
    default: UNSPECIFIED
  BatteryCondition:
    type: string
    enum:
    - UNSPECIFIED
    - OPTIMAL
    - NEW
    default: UNSPECIFIED
  MerchantAddress:
    type: object
    properties:
      id:
        type: string
        format: int64
      version:
        type: string
        format: int64
      label:
        type: string
        title: A user-defined label to identify or categorize the address, e.g. "Main Warehouse"
      first_name:
        type: string
        x-nullable: true
      family_name:
        type: string
        x-nullable: true
      company_name:
        type: string
      country_code:
        $ref: '#/definitions/CountryCode'
      post_code:
        type: string
      town:
        type: string
      street_name:
        type: string
      house_no:
        type: string
        x-nullable: true
      supplement:
        type: string
        x-nullable: true
      phone_number:
        type: string
        x-nullable: true
      type:
        $ref: '#/definitions/MerchantAddressType'
    description: 'MerchantAddress is the address from which the merchant dispatches shipments.

      Used as the merchant''s shipping address in the context of shipping label creation.'
  OrderItemShipmentSubstatus:
    type: string
    enum:
    - UNSPECIFIED
    - INFO_RECEIVED
    - LABEL_CREATED_NO_UPDATES_YET
    - IN_TRANSIT
    - OUT_FOR_DELIVERY
    - AVAILABLE_FOR_PICKUP
    - DELIVERED
    - PICKED_UP_BY_CUSTOMER
    - SIGN_BY_CUSTOMER
    - NEW_ATTEMPT_OF_DELIVERY
    - ADDRESS_ISSUES
    - RETURN_TO_SENDER
    - DELIVERY_FAILED
    - ORDER_DELAYED
    - ORDER_DAMAGED
    - ORDER_LOST
    default: UNSPECIFIED
    description: " - INFO_RECEIVED: The carrier received a request from the shipper and is about to pick up the shipment.\n - LABEL_CREATED_NO_UPDATES_YET: The order has been processed/packaged, but not scanned at a shipping location yet.\n - IN_TRANSIT: Shipment on the way.\n - OUT_FOR_DELIVERY: The package is out for delivery.\n - AVAILABLE_FOR_PICKUP: The package arrived at a pickup point near you and is available for pickup.\n - DELIVERED: Shipment delivered successfully.\n - PICKED_UP_BY_CUSTOMER: Package picked up by the customer.\n - SIGN_BY_CUSTOMER: Package delivered to and signed by the customer.\n - NEW_ATTEMPT_OF_DELIVERY: The delivery of the package failed due to some reason. Courier usually leaves a notice and will try to deliver again.\n - ADDRESS_ISSUES: Package not delivered due to incorrect recipient address.\n - RETURN_TO_SENDER: The package is on its way back to the sender.\n - DELIVERY_FAILED: Delivery of the package failed due to some shipping exception.\n - ORDER_DELAYED: Package delayed due to some unforeseen reasons.\n - ORDER_DAMAGED: Shipment damaged.\n - ORDER_LOST: Delivery of the package failed as it got lost."
  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: '#/definitions/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: '#/definitions/CurrencyCode'
        description: 'Currency the order item was charged in. Is always equal to the currency

          of the order.'
      settlement_currency_code:
        $ref: '#/definitions/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 settlement currency.'
      taxation:
        $ref: '#/definitions/OrderItemTaxation'
        description: How this item was taxed.
      is_refundable:
        type: boolean
        description: Indicates whether this item is currently refundable.
      refund_eligibility:
        $ref: '#/definitions/RefundEligibility'
        description: Indicates whether this item is refundable, if not, why it's not.
      offer_data:
        $ref: '#/definitions/OfferData'
        description: Set if item was created from an offer.
      parcel_tracking_url:
        type: string
        x-nullable: true
        description: Parcel tracking link. Needs to be a valid HTTP(S) URL.
      return_shipment_tracking_url:
        type: string
        x-nullable: true
        description: 'Tracking link for the return parcel. Needs to be a valid HTTP(S) URL.

          Only provided if a return label for this order item has been issued.'
      item_identifier:
        type: string
        x-nullable: true
        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: '#/definitions/OrderItemIdentifier'
      shipment_status:
        $ref: '#/definitions/OrderItemShipmentStatus'
        x-nullable: true
        description: The current shipment status of the order item.
      shipment_substatus:
        $ref: '#/definitions/OrderItemShipmentSubstatus'
        x-nullable: true
        description: The current shipment substatus of the order item.
      return_initiated:
        type: boolean
        description: 'Indicates whether the return process was started for an item by the customer.

          T

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