v1

latestOpenAPI 3.1.02026-07-134488210.8 KB
Returns

Return event

postWebhookreturn

Payload

atstring date-time

Event time

merchantNamestring

Name of the merchant team that owns this return.

type'backfill' | 'created' | 'updated'

Event type

Example payload

{
  "order": {
    "customer": {
      "name": {
        "given": "John",
        "surname": "Smith"
      },
      "phoneNumber": "+15555555555"
    },
    "discounts": {
      "amount": "50.2",
      "currency": "USD"
    },
    "externalId": "1073459971",
    "id": "64e4da943dd822979a70bd12",
    "items": [
      {
        "externalId": "123",
        "fulfillmentLocationId": "123",
        "price": {
          "amount": "50.2",
          "currency": "USD"
        },
        "quantity": 1,
        "variant": {
          "weight": {
            "kg": 0.021
          }
        }
      }
    ],
    "lineItemsTotal": {
      "amount": "50.2",
      "currency": "USD"
    },
    "name": "#123",
    "shippingCost": {
      "amount": "50.2",
      "currency": "USD"
    },
    "taxes": {
      "amount": "50.2",
      "currency": "USD"
    },
    "total": {
      "amount": "50.2",
      "currency": "USD"
    }
  },
  "return": {
    "destination": {
      "mailingAddress": {
        "city": "Anytown",
        "country": "US",
        "line1": "123 Main St",
        "postalCode": "12345",
        "state": "WA"
      },
      "phoneNumber": "+15555555555"
    },
    "exchange": {
      "items": [
        {
          "quantity": 1,
          "variant": {
            "weight": {
              "kg": 0.021
            }
          }
        }
      ],
      "provision": "deferred"
    },
    "externalReturnIds": [
      {
        "provider": "shopify",
        "value": "12345"
      }
    ],
    "giftCards": [
      {
        "amount": {
          "amount": "50.2",
          "currency": "USD"
        }
      }
    ],
    "id": "64df65d4c5a4ca3eff4b4e43",
    "items": [
      {
        "reason": "Too big",
        "refund": {
          "amount": {
            "amount": "50.2",
            "currency": "USD"
          }
        },
        "productValueNoTaxNoAdjustment": {
          "amount": {
            "amount": "50.2",
            "currency": "USD"
          }
        }
      }
    ],
    "order": {
      "id": "64e4da943dd822979a70bd12",
      "name": "#123"
    },
    "source": {
      "mailingAddress": {
        "city": "Anytown",
        "country": "US",
        "line1": "123 Main St",
        "postalCode": "12345",
        "state": "WA"
      },
      "name": {
        "given": "John",
        "surname": "Smith"
      },
      "phoneNumber": "+15555555555"
    },
    "status": "open",
    "totals": {
      "charge": {
        "amount": {
          "amount": "50.2",
          "currency": "USD"
        }
      },
      "exchange": {
        "amount": {
          "amount": "50.2",
          "currency": "USD"
        }
      },
      "refund": {
        "amount": {
          "amount": "50.2",
          "currency": "USD"
        }
      },
      "storeCredit": {
        "amount": {
          "amount": "50.2",
          "currency": "USD"
        }
      }
    },
    "type": "return"
  }
}

Response

Success. Return a 2xx status code to indicate success.