Refurbed OrderService API

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

Operations 13

POST /refb.merchant.v1.OrderService/CalculateRefundOrder Calculate values for a refund of all refundable items of an order at once, i.e. using the RefundOrder method. #
POST /refb.merchant.v1.OrderService/CreateShippingLabel Creates shipping label for an order #
POST /refb.merchant.v1.OrderService/DeleteOrderCommercialInvoice Deletes the previously uploaded commercial invoice for an order. #
POST /refb.merchant.v1.OrderService/DeleteOrderInvoice Deletes the order's invoice. Order needs to be invoiceable. #
POST /refb.merchant.v1.OrderService/GetOrder Gets a single order using its identifier. #
POST /refb.merchant.v1.OrderService/GetOrderCommercialInvoice Returns the previously uploaded commercial invoice for an order. #
POST /refb.merchant.v1.OrderService/GetOrderInvoice Gets the order's invoice. The URL access token is valid for 24h. #
POST /refb.merchant.v1.OrderService/ListOrders Lists orders. #
POST /refb.merchant.v1.OrderService/ListShippingLabels Lists shipping labels for an order #
POST /refb.merchant.v1.OrderService/RefundOrder Refunds all refundable items of an order at once. #
POST /refb.merchant.v1.OrderService/SetOrderInvoiceStream Uploads an invoice for an order. #
POST /refb.merchant.v1.OrderService/UpdateShippingLabelAddress Updates the shipping label address for an order. #
POST /refb.merchant.v1.OrderService/UploadOrderCommercialInvoice Uploads a commercial invoice for an order. #

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-orderservice-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-orderservice-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Affiliate Partner BuybackBidService Order 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: 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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculateRefundOrderResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculateRefundOrderRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateShippingLabelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateShippingLabelRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteOrderCommercialInvoiceRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteOrderInvoiceRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetOrderRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderCommercialInvoiceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetOrderCommercialInvoiceRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderInvoiceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetOrderInvoiceRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrdersResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOrdersRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListShippingLabelsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListShippingLabelsRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundOrderResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundOrderRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetOrderInvoiceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetOrderInvoiceRequest'
        description: ' (streaming inputs)'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateShippingLabelAddressResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateShippingLabelAddressRequest'
        required: true
  /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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadOrderCommercialInvoiceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      tags:
      - OrderService
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadOrderCommercialInvoiceRequest'
        description: ' (streaming inputs)'
        required: true
components:
  schemas:
    CurrencyCodeFilter:
      type: object
      properties:
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/CurrencyCode'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/CurrencyCode'
    GetOrderInvoiceRequest:
      type: object
      properties:
        order_id:
          type: string
          format: int64
          required:
          - order_id
      required:
      - order_id
    RefundOrderResponse:
      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.
        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
    UpdateShippingLabelAddressResponse:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/v1.Address'
    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).'
    UpdateShippingLabelAddressRequest.Address:
      type: object
      properties:
        first_name:
          type: string
          required:
          - first_name
        family_name:
          type: string
          required:
          - family_name
        company:
          type:
          - string
          - 'null'
        street_name:
          type: string
          required:
          - street_name
        house_no:
          type:
          - string
          - 'null'
        supplement:
          type:
          - string
          - 'null'
        town:
          type: string
          required:
          - town
        post_code:
          type: string
          required:
          - post_code
        country_code:
          $ref: '#/components/schemas/CountryCode'
        phone:
          type: string
          required:
          - phone
      required:
      - first_name
      - family_name
      - street_name
      - town
      - post_code
      - phone
    CountryCodeFilter:
      type: object
      properties:
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/CountryCode'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/CountryCode'
    GetOrderResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/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."
    OrderCustomerEmailFilter:
      type: object
      properties:
        eq:
          type:
          - string
          - 'null'
        contains:
          type:
          - string
          - 'null'
    GetOrderRequest:
      type: object
      properties:
        id:
          type: string
          format: int64
          description: The id of the order to get.
          required:
          - id
      required:
      - id
    CarrierEnum.Carrier:
      type: string
      enum:
      - UNSPECIFIED
      - UPS
      - DHL_EXPRESS
      default: UNSPECIFIED
    CreateShippingLabelResponse:
      type: object
      properties:
        shipping_label:
          $ref: '#/components/schemas/ShippingLabel'
    ListOrdersRequest:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Int64Pagination'
        sort:
          $ref: '#/components/schemas/ListOrdersRequest.Sort'
        filter:
          $ref: '#/components/schemas/ListOrdersRequest.Filter'
    NormalPrinterURLs:
      type: object
      properties:
        top_left:
          type: string
        top_right:
          type: string
        bottom_left:
          type: string
        bottom_right:
          type: string
    SetOrderInvoiceRequest:
      type: array
      format: array
      example:
      - meta:
          order_id: '123'
      - data: base64encodedbinary
      properties:
        meta:
          $ref: '#/components/schemas/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).'
    RefundOrderRequest:
      type: object
      properties:
        id:
          type: string
          format: int64
          description: The id of the order to fully refund.
          required:
          - id
      required:
      - id
    SetOrderInvoiceRequest.Meta:
      type: object
      properties:
        order_id:
          type: string
          format: int64
          required:
          - order_id
      required:
      - order_id
    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'
    OrderLabelCollectionFilter:
      type: object
      properties:
        all_of:
          type: array
          items:
            $ref: '#/components/schemas/OrderLabel'
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/OrderLabel'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/OrderLabel'
    ListOrdersRequest.Filter.OrderItemNameFilter:
      type: object
      properties:
        matches:
          type:
          - string
          - 'null'
    GetOrderCommercialInvoiceResponse:
      type: object
      properties:
        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.
    GetOrderCommercialInvoiceRequest:
      type: object
      properties:
        order_id:
          type: string
          format: int64
          required:
          - order_id
      required:
      - order_id
    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
          - 'null'
        family_name:
          type:
          - string
          - 'null'
        company_name:
          type: string
        country_code:
          $ref: '#/components/schemas/CountryCode'
        post_code:
          type: string
        town:
          type: string
        street_name:
          type: string
        house_no:
          type:
          - string
          - 'null'
        supplement:
          type:
          - string
          - 'null'
        phone_number:
          type:
          - string
          - 'null'
        type:
          $ref: '#/components/schemas/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.'
    GetOrderInvoiceResponse:
      type: object
      properties:
        url:
          type: string
          description: URL to invoice file. This will expire.
    TrackingData:
      type: object
      properties:
        carrier:
          type: string
        tracking_number:
          type: string
        tracking_url:
          type: string
    SetOrderInvoiceResponse:
      type: object
      properties:
        size:
          type: string
          format: int64
          description: Size of uploaded invoice in bytes.
        crc32:
          type: string
          description: Uses the IEEE polynomial (0xedb88320).
          title: Hex string representation of CRC32 checksum
        url:
          type: string
          description: URL to invoice file. This will expire.
    DeleteOrderCommercialInvoiceRequest:
      type: object
      properties:
        order_id:
          type: string
          format: int64
          required:
          - order_id
      required:
      - order_id
    AddressEntityFilter:
      type: object
      properties:
        any_of:
          type: array
          items:
            $ref: '#/components/schemas/AddressEntity'
        none_of:
          type: array
          items:
            $ref: '#/components/schemas/AddressEntity'
    UploadOrderCommercialInvoiceRequest:
      type: array
      format: array
      example:
      - meta:
          order_id: '123'
          commercial_invoice_number: INV-123
      - data: base64encodedbinary
      properties:
        meta:
          $ref: '#/components/schemas/UploadOrderCommercialInvoiceRequest.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).'
    OrderAddressVATINFilter:
      type: object
      properties:
        eq:
          type:
          - string
          - 'null'
        contains:
          type:
          - string
          - 'null'
    SortOrder:
      type: string
      enum:
      - ASC
      - DESC
      default: ASC
    CalculateRefundOrderResponse:
      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.
        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.
    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
    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.

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