Skip to main content
GET
/
admin
/
claims
/
{id}
JS SDK
import Medusa from "@medusajs/js-sdk"

export const sdk = new Medusa({
  baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
  debug: import.meta.env.DEV,
  auth: {
    type: "session",
  },
})

sdk.admin.claim.retrieve("claim_123")
.then(({ claim }) => {
  console.log(claim)
})
{
  "claim": {
    "id": "<string>",
    "order_id": "<string>",
    "claim_items": [
      {
        "id": "<string>",
        "claim_id": "<string>",
        "order_id": "<string>",
        "item_id": "<string>",
        "quantity": 123,
        "reason": "missing_item",
        "raw_quantity": {
          "value": "<string>"
        },
        "metadata": {},
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "additional_items": [
      {
        "id": "<string>",
        "claim_id": "<string>",
        "order_id": "<string>",
        "item_id": "<string>",
        "quantity": 123,
        "reason": "missing_item",
        "raw_quantity": {
          "value": "<string>"
        },
        "metadata": {},
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "return": {
      "id": "<string>",
      "order_id": "<string>",
      "items": [
        {
          "id": "<string>",
          "quantity": 123,
          "received_quantity": 123,
          "damaged_quantity": 123,
          "item_id": "<string>",
          "return_id": "<string>",
          "reason_id": "<string>",
          "note": "<string>",
          "metadata": {}
        }
      ],
      "created_at": "2023-11-07T05:31:56Z",
      "canceled_at": "2023-11-07T05:31:56Z",
      "order_version": 123,
      "display_id": 123,
      "received_at": "<string>",
      "status": "canceled",
      "refund_amount": 123,
      "exchange_id": "<string>",
      "location_id": "<string>",
      "claim_id": "<string>",
      "no_notification": true
    },
    "display_id": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "order": {
      "payment_collections": [
        {
          "id": "<string>",
          "currency_code": "<string>",
          "amount": 123,
          "status": "canceled",
          "payment_providers": [
            {
              "id": "<string>",
              "is_enabled": true
            }
          ],
          "authorized_amount": 123,
          "captured_amount": 123,
          "refunded_amount": 123,
          "completed_at": "2023-11-07T05:31:56Z",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "metadata": {},
          "payment_sessions": [
            {
              "id": "<string>",
              "amount": 123,
              "currency_code": "usd",
              "provider_id": "<string>",
              "data": {},
              "status": "authorized",
              "context": {
                "customer": {
                  "id": "cus_123"
                }
              },
              "authorized_at": "2023-11-07T05:31:56Z",
              "payment_collection": {}
            }
          ],
          "payments": [
            {
              "id": "<string>",
              "amount": 123,
              "currency_code": "<string>",
              "provider_id": "<string>",
              "authorized_amount": 123,
              "data": {},
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "captured_at": "2023-11-07T05:31:56Z",
              "canceled_at": "2023-11-07T05:31:56Z",
              "captured_amount": 123,
              "refunded_amount": 123,
              "captures": [
                {
                  "id": "<string>",
                  "amount": 123,
                  "created_at": "2023-11-07T05:31:56Z",
                  "payment": {},
                  "created_by": "<string>"
                }
              ],
              "refunds": [
                {
                  "id": "<string>",
                  "amount": 123,
                  "created_at": "2023-11-07T05:31:56Z",
                  "payment": {
                    "id": "<string>",
                    "amount": 123,
                    "currency_code": "<string>",
                    "provider_id": "<string>",
                    "authorized_amount": 123,
                    "data": {},
                    "created_at": "2023-11-07T05:31:56Z",
                    "updated_at": "2023-11-07T05:31:56Z",
                    "captured_at": "2023-11-07T05:31:56Z",
                    "canceled_at": "2023-11-07T05:31:56Z",
                    "captured_amount": 123,
                    "refunded_amount": 123,
                    "captures": [
                      {
                        "id": "<string>",
                        "amount": 123,
                        "created_at": "2023-11-07T05:31:56Z",
                        "payment": {},
                        "created_by": "<string>"
                      }
                    ],
                    "refunds": [
                      {
                        "id": "<string>",
                        "amount": 123,
                        "created_at": "2023-11-07T05:31:56Z",
                        "payment": {},
                        "refund_reason_id": "<string>",
                        "note": "<string>",
                        "created_by": "<string>"
                      }
                    ],
                    "payment_collection": {},
                    "payment_session": {}
                  },
                  "refund_reason_id": "<string>",
                  "note": "<string>",
                  "created_by": "<string>"
                }
              ],
              "payment_collection": {}
            }
          ]
        }
      ],
      "id": "<string>",
      "version": 123,
      "region_id": "<string>",
      "customer_id": "<string>",
      "sales_channel_id": "<string>",
      "email": "jsmith@example.com",
      "currency_code": "<string>",
      "items": [
        {
          "id": "<string>",
          "title": "<string>",
          "subtitle": "<string>",
          "thumbnail": "<string>",
          "variant_id": "<string>",
          "product_id": "<string>",
          "product_title": "<string>",
          "product_description": "<string>",
          "product_subtitle": "<string>",
          "product_type": "<string>",
          "product_collection": "<string>",
          "product_handle": "<string>",
          "variant_sku": "<string>",
          "variant_barcode": "<string>",
          "variant_title": "<string>",
          "variant_option_values": {
            "Color": "Blue"
          },
          "requires_shipping": true,
          "is_discountable": true,
          "is_tax_inclusive": true,
          "unit_price": 123,
          "quantity": 123,
          "detail": {},
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "metadata": {},
          "original_total": 123,
          "original_subtotal": 123,
          "original_tax_total": 123,
          "item_total": 123,
          "item_subtotal": 123,
          "item_tax_total": 123,
          "total": 123,
          "subtotal": 123,
          "tax_total": 123,
          "discount_total": 123,
          "discount_tax_total": 123,
          "refundable_total": 123,
          "refundable_total_per_unit": 123,
          "product_type_id": "<string>",
          "compare_at_unit_price": 123,
          "tax_lines": [
            {
              "item": {},
              "item_id": "<string>",
              "total": 123,
              "subtotal": 123,
              "id": "<string>",
              "code": "<string>",
              "rate": 123,
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "description": "<string>",
              "tax_rate_id": "<string>",
              "provider_id": "<string>"
            }
          ],
          "adjustments": [
            {
              "item": {},
              "item_id": "<string>",
              "id": "<string>",
              "amount": 123,
              "order_id": "<string>",
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "code": "<string>",
              "description": "<string>",
              "promotion_id": "<string>",
              "provider_id": "<string>"
            }
          ]
        }
      ],
      "shipping_methods": [
        {
          "id": "<string>",
          "order_id": "<string>",
          "name": "<string>",
          "amount": 123,
          "is_tax_inclusive": true,
          "shipping_option_id": "<string>",
          "data": {},
          "metadata": {},
          "original_total": 123,
          "original_subtotal": 123,
          "original_tax_total": 123,
          "total": 123,
          "subtotal": 123,
          "tax_total": 123,
          "discount_total": 123,
          "discount_tax_total": 123,
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "description": "<string>",
          "tax_lines": [
            {
              "shipping_method": {},
              "shipping_method_id": "<string>",
              "total": 123,
              "subtotal": 123,
              "id": "<string>",
              "code": "<string>",
              "rate": 123,
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "description": "<string>",
              "tax_rate_id": "<string>",
              "provider_id": "<string>"
            }
          ],
          "adjustments": [
            {
              "shipping_method": {},
              "shipping_method_id": "<string>",
              "id": "<string>",
              "amount": 123,
              "order_id": "<string>",
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "code": "<string>",
              "description": "<string>",
              "promotion_id": "<string>",
              "provider_id": "<string>"
            }
          ]
        }
      ],
      "payment_status": "canceled",
      "fulfillment_status": "canceled",
      "summary": {
        "paid_total": 123,
        "refunded_total": 123,
        "pending_difference": 123,
        "current_order_total": 123,
        "original_order_total": 123,
        "transaction_total": 123,
        "accounting_total": 123
      },
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "original_item_total": 123,
      "original_item_subtotal": 123,
      "original_item_tax_total": 123,
      "item_total": 123,
      "item_subtotal": 123,
      "item_tax_total": 123,
      "original_total": 123,
      "original_subtotal": 123,
      "original_tax_total": 123,
      "total": 123,
      "subtotal": 123,
      "tax_total": 123,
      "discount_total": 123,
      "discount_tax_total": 123,
      "gift_card_total": 123,
      "gift_card_tax_total": 123,
      "shipping_total": 123,
      "shipping_subtotal": 123,
      "shipping_tax_total": 123,
      "original_shipping_total": 123,
      "original_shipping_subtotal": 123,
      "original_shipping_tax_total": 123,
      "status": "<string>",
      "credit_line_total": 123,
      "item_discount_total": 123,
      "shipping_discount_total": 123,
      "fulfillments": [
        {
          "id": "<string>",
          "location_id": "<string>",
          "packed_at": "2023-11-07T05:31:56Z",
          "shipped_at": "2023-11-07T05:31:56Z",
          "delivered_at": "2023-11-07T05:31:56Z",
          "canceled_at": "2023-11-07T05:31:56Z",
          "data": {},
          "provider_id": "<string>",
          "shipping_option_id": "<string>",
          "metadata": {},
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "requires_shipping": true
        }
      ],
      "display_id": 123,
      "transactions": [
        {
          "id": "<string>",
          "order_id": "<string>",
          "amount": 123,
          "currency_code": "usd",
          "reference": "capture",
          "reference_id": "<string>",
          "metadata": {},
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        }
      ],
      "metadata": {},
      "credit_lines": [
        {
          "id": "<string>",
          "order_id": "<string>",
          "order": {},
          "reference": "<string>",
          "reference_id": "<string>",
          "metadata": {},
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "amount": 123
        }
      ],
      "custom_display_id": "<string>"
    },
    "type": "replace",
    "order_version": "<string>",
    "canceled_at": "2023-11-07T05:31:56Z",
    "return_id": "<string>",
    "no_notification": true,
    "refund_amount": 123,
    "shipping_methods": [
      {
        "id": "<string>",
        "order_id": "<string>",
        "name": "<string>",
        "amount": 123,
        "is_tax_inclusive": true,
        "shipping_option_id": "<string>",
        "data": {},
        "metadata": {},
        "original_total": 123,
        "original_subtotal": 123,
        "original_tax_total": 123,
        "total": 123,
        "subtotal": 123,
        "tax_total": 123,
        "discount_total": 123,
        "discount_tax_total": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "description": "<string>",
        "tax_lines": [
          {
            "shipping_method": {},
            "shipping_method_id": "<string>",
            "total": 123,
            "subtotal": 123,
            "id": "<string>",
            "code": "<string>",
            "rate": 123,
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "description": "<string>",
            "tax_rate_id": "<string>",
            "provider_id": "<string>"
          }
        ],
        "adjustments": [
          {
            "shipping_method": {},
            "shipping_method_id": "<string>",
            "id": "<string>",
            "amount": 123,
            "order_id": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "code": "<string>",
            "description": "<string>",
            "promotion_id": "<string>",
            "provider_id": "<string>"
          }
        ]
      }
    ],
    "transactions": [
      {
        "id": "<string>",
        "order_id": "<string>",
        "amount": 123,
        "currency_code": "usd",
        "reference": "capture",
        "reference_id": "<string>",
        "metadata": {},
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "metadata": {},
    "created_by": "<string>",
    "deleted_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The claim's ID.

Query Parameters

fields
string

Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.

Response

OK

The claim's details.

claim
object
required

The claim's details.