AfterShip · Schema

Return

[url](/docs/enum/platforms.md)

ShippingTrackingE-CommercePost-PurchaseNotificationLogisticsReturnsWarrantyAddress ValidationFulfillmentCarrierWebhookMCPRetail

Properties

Name Type Description
id string
organization object
rma_number string
contact_email string The contact email address for the return.
filed_by object
approval_status string
approved_at stringnull The timestamp when this return was approved.
auto_approved booleannull Indicates whether the return was automatically approved.
rejected_at stringnull The timestamp when this return was rejected.
reject_reason stringnull The reason for the return rejection.
auto_rejected booleannull Indicates whether the return was automatically rejected.
resolved_at stringnull The timestamp when this return was resolved.
auto_resolved booleannull Indicates whether the return was automatically resolved.
refunded_at stringnull The timestamp when this return was refunded.
auto_refunded booleannull Indicates whether the return was automatically refunded.
auto_received booleannull Indicates whether the return has triggered an automatic receive.
expired_at stringnull The timestamp when this return was expired.
shop_now boolean Whether the "Shop Now" feature (also known as "Exchange for other items") has been used.
merchant_note stringnull
return_total_including_tax object
return_tax object The tax amount associated with the return.
refund_destination stringnull
refunded_total object The total amount refunded for the return.
estimated_refund_total object
checkout_total object
shipping_address object The shipping address for the return.
order object
return_items array
return_method object
exchange object
instant_exchange object
receivings array
is_gift_return boolean Indicates whether this is a gift return.
shipments array
restocks array
cost_of_return object
refunds array
dropoffs array
outcomes array Expected result of the return
created_at string
shipping_status string The shipping status at the return level.
exceptions array Exceptions in the return that require manual handling
View JSON Schema on GitHub

JSON Schema

aftership-return-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/aftership/main/json-schema/aftership-return-schema.json",
  "title": "Return",
  "description": "<div style=\"display:none; height: 0\">[url](/docs/enum/platforms.md)</div>",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aftership-returns-api-openapi.yml#/components/schemas/Return",
  "type": "object",
  "x-stoplight": {
    "id": "0jq12hby7re52"
  },
  "properties": {
    "id": {
      "type": "string",
      "x-stoplight": {
        "id": "uguvcl6vpq542"
      }
    },
    "organization": {
      "type": "object",
      "x-stoplight": {
        "id": "vowslkac1g97c"
      },
      "properties": {
        "id": {
          "type": "string",
          "x-stoplight": {
            "id": "bkx7w9udgrh5d"
          }
        }
      }
    },
    "rma_number": {
      "type": "string",
      "x-stoplight": {
        "id": "ch89c3c9iyzl1"
      }
    },
    "contact_email": {
      "type": "string",
      "description": "The contact email address for the return.",
      "x-stoplight": {
        "id": "a2c3d4e5f6g7h"
      }
    },
    "filed_by": {
      "enum": [
        "shopper",
        "merchant",
        "customer_support"
      ],
      "x-stoplight": {
        "id": "uo7dlr7kjz8p3"
      }
    },
    "approval_status": {
      "type": "string",
      "enum": [
        "submitted",
        "approved",
        "done",
        "rejected",
        "expired"
      ],
      "x-stoplight": {
        "id": "hqacreuxv6tce"
      }
    },
    "approved_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp when this return was approved.",
      "x-stoplight": {
        "id": "j6nsqp702fyjq"
      }
    },
    "auto_approved": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Indicates whether the return was automatically approved.",
      "x-stoplight": {
        "id": "owm1dix0l0cbv"
      }
    },
    "rejected_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp when this return was rejected.",
      "x-stoplight": {
        "id": "ddbro31280khu"
      }
    },
    "reject_reason": {
      "type": [
        "string",
        "null"
      ],
      "description": "The reason for the return rejection.",
      "x-stoplight": {
        "id": "66gazjsdhzw4r"
      }
    },
    "auto_rejected": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Indicates whether the return was automatically rejected.",
      "x-stoplight": {
        "id": "o03wtszj1504j"
      }
    },
    "resolved_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp when this return was resolved.",
      "x-stoplight": {
        "id": "184pdspa8y0y0"
      }
    },
    "auto_resolved": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Indicates whether the return was automatically resolved.",
      "x-stoplight": {
        "id": "0cszxadqktjys"
      }
    },
    "refunded_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp when this return was refunded.",
      "x-stoplight": {
        "id": "1ma2eumogk7mc"
      }
    },
    "auto_refunded": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Indicates whether the return was automatically refunded.",
      "x-stoplight": {
        "id": "71chosr31lm1t"
      }
    },
    "auto_received": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Indicates whether the return has triggered an automatic receive.",
      "x-stoplight": {
        "id": "pz7kr7ucvo50h"
      }
    },
    "expired_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp when this return was expired.",
      "x-stoplight": {
        "id": "ojym85rr7c653"
      }
    },
    "shop_now": {
      "type": "boolean",
      "description": "Whether the \"Shop Now\" feature (also known as \"Exchange for other items\") has been used.",
      "x-stoplight": {
        "id": "5ukd741ftug2v"
      }
    },
    "merchant_note": {
      "type": [
        "string",
        "null"
      ],
      "x-stoplight": {
        "id": "sdjg0gvce8is4"
      }
    },
    "return_total_including_tax": {
      "oneOf": [
        {
          "type": "object",
          "$ref": "#/$defs/Money",
          "x-stoplight": {
            "id": "wze17i0uncp4r"
          }
        },
        {
          "type": [
            "null"
          ],
          "x-stoplight": {
            "id": "ddx4ecapbacyv"
          }
        }
      ],
      "x-stoplight": {
        "id": "jz57sfh4zcti1"
      }
    },
    "return_tax": {
      "oneOf": [
        {
          "type": "object",
          "$ref": "#/$defs/Money",
          "x-stoplight": {
            "id": "rab8xfsh3afnt"
          }
        },
        {
          "type": [
            "null"
          ],
          "x-stoplight": {
            "id": "4b819ad0r2uf6"
          }
        }
      ],
      "description": "The tax amount associated with the return.",
      "x-stoplight": {
        "id": "0cn90pqlp634v"
      }
    },
    "refund_destination": {
      "x-stoplight": {
        "id": "raid0ie9oeoig"
      },
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "original_payment",
        "store_credit"
      ]
    },
    "refunded_total": {
      "description": "The total amount refunded for the return.",
      "oneOf": [
        {
          "type": "object",
          "$ref": "#/$defs/Money",
          "x-stoplight": {
            "id": "pua85mv3dg2uc"
          }
        },
        {
          "x-stoplight": {
            "id": "mbeuze1biu93p"
          },
          "type": [
            "null"
          ]
        }
      ],
      "x-stoplight": {
        "id": "iohmf9fw7le3d"
      }
    },
    "estimated_refund_total": {
      "x-stoplight": {
        "id": "jjqsxnc3hyrou"
      },
      "oneOf": [
        {
          "type": "object",
          "$ref": "#/$defs/Money",
          "x-stoplight": {
            "id": "w0fjam88nlahu"
          }
        },
        {
          "type": [
            "null"
          ],
          "x-stoplight": {
            "id": "jkrat9zipxh1f"
          }
        }
      ]
    },
    "checkout_total": {
      "x-stoplight": {
        "id": "1ciuvzwdo67tq"
      },
      "oneOf": [
        {
          "type": "object",
          "$ref": "#/$defs/Money",
          "x-stoplight": {
            "id": "iyjakb570i3ix"
          }
        },
        {
          "type": [
            "null"
          ],
          "x-stoplight": {
            "id": "ihiegpmowh4fu"
          }
        }
      ]
    },
    "shipping_address": {
      "$ref": "#/$defs/Address",
      "description": "The shipping address for the return.",
      "x-stoplight": {
        "id": "d5f6g7h8i9j0k"
      }
    },
    "order": {
      "$ref": "#/$defs/Order",
      "x-stoplight": {
        "id": "c6emqfzr1b3sp"
      }
    },
    "return_items": {
      "type": "array",
      "x-stoplight": {
        "id": "1gvqxtsx3dekd"
      },
      "items": {
        "$ref": "#/$defs/Return_item",
        "x-stoplight": {
          "id": "rsbuiw94xkgco"
        }
      }
    },
    "return_method": {
      "$ref": "#/$defs/Return_method",
      "x-stoplight": {
        "id": "i9a7uqiwwflbr"
      }
    },
    "exchange": {
      "x-stoplight": {
        "id": "oj71bdjlpsjka"
      },
      "oneOf": [
        {
          "type": "object",
          "$ref": "#/$defs/Exchange",
          "x-stoplight": {
            "id": "8n689pupnq8fh"
          }
        },
        {
          "type": [
            "null"
          ],
          "x-stoplight": {
            "id": "aqbb3efa8kqm7"
          }
        }
      ]
    },
    "instant_exchange": {
      "x-stoplight": {
        "id": "a1qg226i6zk9k"
      },
      "oneOf": [
        {
          "type": "object",
          "$ref": "#/$defs/Instant_exchange",
          "x-stoplight": {
            "id": "seoh4kukxl01u"
          }
        },
        {
          "type": [
            "null"
          ],
          "x-stoplight": {
            "id": "lx2esa1bl5r99"
          }
        }
      ]
    },
    "receivings": {
      "type": "array",
      "x-stoplight": {
        "id": "k3pj2dvgtqwjv"
      },
      "items": {
        "$ref": "#/$defs/Receiving",
        "x-stoplight": {
          "id": "b6lxmjgycvc07"
        }
      }
    },
    "is_gift_return": {
      "type": "boolean",
      "description": "Indicates whether this is a gift return.",
      "x-stoplight": {
        "id": "gqc983nzid86p"
      }
    },
    "shipments": {
      "type": "array",
      "x-stoplight": {
        "id": "to0ct81w40c7b"
      },
      "items": {
        "$ref": "#/$defs/Return_shipment",
        "x-stoplight": {
          "id": "r3rb6iy8jfovb"
        }
      }
    },
    "restocks": {
      "type": "array",
      "x-stoplight": {
        "id": "a5qt9sjt4xsk7"
      },
      "items": {
        "$ref": "#/$defs/Restock",
        "x-stoplight": {
          "id": "8ot5nksvht5cw"
        }
      }
    },
    "cost_of_return": {
      "oneOf": [
        {
          "type": "object",
          "$ref": "#/$defs/Cost_of_return",
          "x-stoplight": {
            "id": "y2f9q9tz7b97p"
          }
        },
        {
          "type": [
            "null"
          ],
          "x-stoplight": {
            "id": "aeu0gleqy56v2"
          }
        }
      ],
      "x-stoplight": {
        "id": "5s46h8gbz3r23"
      }
    },
    "refunds": {
      "type": "array",
      "x-stoplight": {
        "id": "3edmngrl663cc"
      },
      "items": {
        "$ref": "#/$defs/Refund",
        "x-stoplight": {
          "id": "jy7axzp9nmy7v"
        }
      }
    },
    "dropoffs": {
      "type": "array",
      "x-stoplight": {
        "id": "7gaiuxe9ql9ma"
      },
      "items": {
        "$ref": "#/$defs/Dropoff",
        "x-stoplight": {
          "id": "suypn47zwslqj"
        }
      }
    },
    "outcomes": {
      "type": "array",
      "x-stoplight": {
        "id": "djjr4pyxr2rwk"
      },
      "description": "Expected result of the return",
      "items": {
        "x-stoplight": {
          "id": "omw05ks21ryrx"
        },
        "type": "string",
        "enum": [
          "exchange",
          "refund",
          "upsell",
          "store_credit"
        ]
      }
    },
    "created_at": {
      "type": "string",
      "x-stoplight": {
        "id": "30km8fnulhob8"
      }
    },
    "shipping_status": {
      "x-stoplight": {
        "id": "ibdwsbv6z734e"
      },
      "type": "string",
      "enum": [
        "no_label",
        "pending",
        "in_transit",
        "delivered",
        "partially_received",
        "received",
        "partially_dropped",
        "dropped",
        "void"
      ],
      "description": "The shipping status at the return level."
    },
    "exceptions": {
      "type": "array",
      "x-stoplight": {
        "id": "1v4ub45v9mg69"
      },
      "description": "Exceptions in the return that require manual handling",
      "items": {
        "x-stoplight": {
          "id": "cens5ey3u5gvx"
        },
        "type": "string",
        "enum": [
          "exchange_failed",
          "restock_failed",
          "generate_label_failed",
          "refund_failed",
          "charge_failed",
          "flagged"
        ]
      }
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "x-stoplight": {
        "id": "7cc87e0eb2a0d"
      },
      "title": "Address",
      "required": [
        "contact_name",
        "street_1",
        "city",
        "state",
        "postal_code",
        "country_region"
      ],
      "properties": {
        "contact_name": {
          "type": [
            "string",
            "null"
          ],
          "x-stoplight": {
            "id": "lwugfye8q3bt0"
          },
          "description": "The name of the contact person associated with the address.\n"
        },
        "company_name": {
          "type": [
            "string",
            "null"
          ],
          "x-stoplight": {
            "id": "jozyy6y4x6hal"
          },
          "description": "The name of the company or organization associated with the address.\n"
        },
        "street_1": {
          "type": [
            "string",
            "null"
          ],
          "title": "The Street_1 Schema",
          "description": "First line of the street address."
        },
        "street_2": {
          "type": [
            "string",
            "null"
          ],
          "title": "The Street_2 Schema",
          "description": "Second line of the street address."
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "title": "The City Schema",
          "description": "The location's city, town, or village."
        },
        "state": {
          "title": "The State Schema",
          "description": "The state or region of the location, such as a province, state, or prefecture.",
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "name": {
              "type": "string",
              "x-stoplight": {
                "id": "2n3yyt164fwtn"
              },
              "description": "The state or region of the location, such as a province, state, or prefecture.\n\n"
            }
          }
        },
        "postal_code": {
          "type": [
            "string",
            "null"
          ],
          "title": "The Postal_code Schema",
          "description": "The postal code of the location (also known as zip code, postcode, Eircode, etc.)."
        },
        "country_region": {
          "title": "The Country Schema",
          "description": "The address country/region in [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format.",
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "code": {
              "type": "string",
              "x-stoplight": {
                "id": "ttabbo8vl3xur"
              },
              "description": "The address country/region in ISO 3166-1 alpha-3 format.\n\n"
            }
          }
        },
        "phone": {
          "type": [
            "string",
            "null"
          ],
          "x-stoplight": {
            "id": "lio9zgakvzqhp"
          },
          "description": "The contact phone number associated with the address.\n"
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "x-stoplight": {
            "id": "ox7s3omkrkk3f"
          },
          "description": "The email associated with the address."
        }
      }
    },
    "Cost_of_return": {
      "type": "object",
      "x-stoplight": {
        "id": "y2f9q9tz7b97p"
      },
      "title": "CostOfReturn",
      "properties": {
        "charged": {
          "oneOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "description": "This field indicates the cost of return that has already been charged. If payment or refund has not yet occurred, this value will be null, as the cost of return has not been actually charged yet."
        },
        "value": {
          "$ref": "#/$defs/Money",
          "description": "This field indicates the cost of return that should be charged."
        }
      }
    },
    "Dropoff": {
      "x-stoplight": {
        "id": "suypn47zwslqj"
      },
      "title": "Dropoff",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for the dropoff.",
          "nullable": false,
          "x-stoplight": {
            "id": "lbtp35qudr2ge"
          }
        },
        "qr_code_url": {
          "type": "string",
          "description": "The QR code URL provided by the dropoff service provider to the shopper.",
          "nullable": false,
          "x-stoplight": {
            "id": "o91erddureyez"
          }
        },
        "dropoff_number": {
          "type": "string",
          "description": "The identifier of this dropoff resource on the dropoff service provider's side (e.g., Express Code from Happy Returns).",
          "nullable": false,
          "x-stoplight": {
            "id": "47rhr30ryrg2p"
          }
        },
        "service_provider": {
          "type": "string",
          "enum": [
            "happy-returns",
            "retail-reworks"
          ],
          "description": "The dropoff service provider used for this operation.",
          "nullable": false,
          "x-stoplight": {
            "id": "trk619v8ht66g"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "The creation time of the dropoff record.",
          "nullable": false,
          "x-stoplight": {
            "id": "cki52lrmfkun4"
          }
        },
        "status": {
          "type": "string",
          "enum": [
            "created",
            "dropped",
            "partially_dropped"
          ],
          "description": "The current status of the dropoff.",
          "x-stoplight": {
            "id": "2fd15xo10wonz"
          }
        },
        "items": {
          "type": "array",
          "description": "The list of items included in the dropoff operation.",
          "items": {
            "type": "object",
            "properties": {
              "external_order_item_id": {
                "type": "string",
                "description": "The ID of the item on the e-commerce platform.",
                "x-stoplight": {
                  "id": "383ubdcctiyjo"
                }
              },
              "quantity": {
                "type": "number",
                "description": "The number of items included in the dropoff.",
                "x-stoplight": {
                  "id": "7ew44n8e0vhgc"
                }
              }
            },
            "x-stoplight": {
              "id": "btzmrmtuwzly4"
            }
          },
          "x-stoplight": {
            "id": "1psoblvyrcaqf"
          }
        },
        "shipments": {
          "description": "The list of shipments associated with this dropoff.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Dropoff_shipment",
            "x-stoplight": {
              "id": "29fh0z7bhc6hm"
            }
          },
          "x-stoplight": {
            "id": "6tzkxfpx4jexk"
          }
        }
      }
    },
    "Dropoff_shipment": {
      "x-stoplight": {
        "id": "29fh0z7bhc6hm"
      },
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for the dropoff shipment."
        },
        "external_id": {
          "type": "string",
          "description": "The ID of the shipment on the e-commerce platform."
        },
        "service_provider_carrier_code": {
          "type": "string",
          "description": "The identifier provided by the dropoff provider representing the logistics carrier for the package, which may differ from the slug provided by AfterShip Tracking."
        },
        "tracking_number": {
          "type": "string",
          "description": "The tracking number for the dropoff shipment."
        },
        "items": {
          "type": "array",
          "description": "The list of items included in the dropoff shipment.",
          "items": {
            "type": "object",
            "properties": {
              "external_order_item_id": {
                "type": "string",
                "description": "The ID of the item on the e-commerce platform."
              },
              "quantity": {
                "type": "number",
                "description": "The number of items included in the dropoff shipment."
              },
              "return_bag_barcodes": {
                "type": "array",
                "description": "The barcode on the corresponding item when the dropoff provider sends the package to the merchant.",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "title": "DropoffShipment"
    },
    "Exchange": {
      "type": "object",
      "x-stoplight": {
        "id": "8n689pupnq8fh"
      },
      "title": "Exchange",
      "properties": {
        "order": {
          "type": [
            "object",
            "null"
          ],
          "description": "The order details associated with the exchange. This field will only have a value after an order has been created.",
          "properties": {
            "external_id": {
              "type": "string",
              "description": "The identifier for the source order."
            },
            "order_number": {
              "type": "string",
              "description": "The order number associated with the original order."
            },
            "customer": {
              "type": "object",
              "description": "Contains the customer's basic information.",
              "properties": {
                "emails": {
                  "type": "array",
                  "description": "A list of email addresses associated with the customer.",
                  "items": {
                    "type": "string"
                  }
                },
                "locale": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "x-stoplight": {
                    "id": "e53mtt4fe256v"
                  }
                }
              }
            },
            "country": {
              "type": "string",
              "description": "The country related to the order."
            },
            "store": {
              "type": "object",
              "description": "Contains brief information about the store.",
              "properties": {
                "platform": {
                  "type": "string",
                  "description": "The e-commerce platform where the store is located."
                },
                "external_id": {
                  "type": "string",
                  "description": "The identifier of the store on the e-commerce platform."
                }
              }
            }
          }
        },
        "items": {
          "type": "array",
          "description": "The list of items included in the exchange.",
          "items": {
            "type": "object",
            "properties": {
              "external_product_id": {
                "type": "string",
                "description": "The ID of the product on the e-commerce platform."
              },
              "external_variant_id": {
                "type": "string",
                "description": "The ID of the variant on the e-commerce platform."
              },
              "sku": {
                "type": "string",
                "description": "The SKU of the item."
              },
              "title": {
                "type": "string",
                "description": "The title of the product."
              },
              "variant_to_replace": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "This field only has a value when using replacement. In the context of replacement, this field refers to the information of the item used for replacement in the original order.",
                "properties": {
                  "external_id": {
                    "type": "string",
                    "description": "The id of the variant on the e-commerce platform."
                  },
                  "external_product_id": {
                    "type": "string",
                    "description": "The id of the product on the e-commerce platform."
                  },
                  "title": {
                    "type": "string",
                    "description": "The title of the varient."
                  },
                  "sku": {
                    "type": "string",
                    "description": "The sku of the item."
                  }
                }
              },
              "quantity": {
                "type": "number",
                "nullable": false,
                "description": "This field indicates the quantity of the exchange item."
              },
              "unit_display_price": {
                "description": "The display price of each item.",
                "oneOf": [
                  {
                    "type": "object",
                    "$ref": "#/$defs/Money",
                    "x-stoplight": {
                      "id": "kz8ffcugbg1po"
                    }
                  },
                  {
                    "type": [
                      "null"
                    ],
                    "x-stoplight": {
                      "id": "e4daz1wgnfxtb"
                    }
                  }
                ]
              },
              "product_title": {
                "type": "string",
                "x-stoplight": {
                  "id": "bkqvmmtgmr2qe"
                }
              },
              "variant_title": {
                "type": "string",
                "x-stoplight": {
                  "id": "0o38vt7r4wf3v"
                }
              },
              "product_image_urls": {
                "type": "array",
                "description": "A list of image URLs for the product.",
                "items": {
                  "type": "string"
                },
                "x-stoplight": {
                  "id": "e6f7g8h9i0j1k"
                }
              }
            }
          }
        },
        "tax_total": {
          "oneOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "description": "The total amount of tax applied to the exchange."
        },
        "bonus_credits": {
          "type": "array",
          "description": "The bonus credits applied to the exchange.",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "extra_credit",
                  "pre_discount_credit"
                ],
                "description": "The type of bonus credit."
              },
              "value": {
                "oneOf": [
                  {
                    "$ref": "#/$defs/Money"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "This field is available when the type is pre_discount_credit or when the type is extra_credit with a mode of fixed amount."
              },
              "rate": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "This field is available when the type is extra_credit with a mode of percentage."
              },
              "used": {
                "$ref": "#/$defs/Money",
                "description": "Indicates the actual amount of bonus credit used."
              }
            }
          }
        },
        "bonus_credits_used_total": {
          "description": "The total value of bonus credits used in the exchange.",
          "oneOf": [
            {
              "type": "object",
              "$ref": "#/$defs/Money",
              "x-stoplight": {
                "id": "upg6z4yewpcx1"
              }
            },
            {
              "x-stoplight": {
                "id": "k1k9lwv4xbcd0"
              },
              "type": [
                "null"
              ]
            }
          ]
        },
        "exchange_total_including_tax": {
          "oneOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "description": "Total value including tax for the exchange."
        },
        "charge_by": {
          "x-stoplight": {
            "id": "z1jq3blfrqjof"
          },
          "type": "string",
          "enum": [
            "aftership",
            "other"
          ],
          "description": "The party responsible for collecting the fee incurred by the exchange."
        }
      }
    },
    "Instant_exchange": {
      "type": "object",
      "x-stoplight": {
        "id": "seoh4kukxl01u"
      },
      "title": "InstantExchange",
      "properties": {
        "status": {
          "x-stoplight": {
            "id": "r59povuw4wgof"
          },
          "enum": [
            "pending",
            "charged",
            "canceled",
            "failed"
          ],
          "description": "The status of the instant exchange payment. \"pending\" means the shopper has authorized the charge, \"charged\" means the merchant has successfully collected the payment, and \"canceled\" means the payment is no longer required and has been canceled."
        },
        "payment": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "id": {
              "type": "string",
              "description": "The unique identifier for the payment."
            },
            "external_id": {
              "type": "string",
              "description": "The identifier for this payment on the third-party payment platform."
            },
            "total": {
              "description": "The total amount and currency of this payment.",
              "oneOf": [
                {
                  "type": "object",
                  "$ref": "#/$defs/Money",
                  "x-stoplight": {
                    "id": "44db4xhavpl8o"
                  }
                },
                {
                  "type": [
                    "null"
                  ],
                  "x-stoplight": {
                    "id": "yeo77qd6efa8q"
                  }
                }
              ]
            },
            "gateway": {
              "type": "string",
              "enum": [
                "stripe"
              ],
              "description": "The payment gateway used for this transaction. Currently, we only support Stripe."
            }
          }
        }
      }
    },
    "Item_tag": {
      "x-stoplight": {
        "id": "q94m5j9owjozk"
      },
      "title": "ItemTag",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for the item tag."
        },
        "name": {
          "type": "string",
          "description": "The name of the item tag."
        },
        "created_at": {
          "type": "string",
          "x-stoplight": {
            "id": "nuzjnjy1v00m2"
          },
          "description": "The create time of the item-tag."
        }
      }
    },
    "Money": {
      "type": "object",
      "title": "Money",
      "properties": {
        "amount": {
          "type": "string",
          "description": "The amount represented with two decimal places."
        },
        "currency": {
          "type": "string",
          "description": "The currency code, using ISO 4217 standards."
        }
      }
    },
    "Order": {
      "x-stoplight": {
        "id": "c6emqfzr1b3sp"
      },
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "x-stoplight": {
            "id": "crbdqq21eqthj"
          }
        },
        "external_id": {
          "type": "string",
          "description": "The order ID of the original order on the e-commerce platform."
        },
        "order_number": {
          "type": "string",
          "description": "The order number of the original order on the e-commerce platform."
        },
        "order_name": {
          "type": "string",
          "description": "The order name of the original order on the e-commerce platform."
        },
        "customer": {
          "type": "object

# --- truncated at 32 KB (70 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/aftership/refs/heads/main/json-schema/aftership-return-schema.json

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/aftership-return"
All schemas
curl "https://apis.io/api/v1/json-schemas?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.