---
updatedAt: 2025-11-21T23:04:48.000Z
agentTools:
  projectIndex: https://returnbear.readme.io/llms.txt
---

# post

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "FulfillmentWebhookEvent": {
        "description": "A webhook event for fulfillment-related operations.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReturnBear.Webhooks.Payloads.FulfillmentEventPayload"
          },
          "event_type": {
            "description": "The unique identifier for the return, generated by ReturnBear.",
            "enum": [
              "FULFILLMENT_TRACKING_STATUS_UPDATED"
            ],
            "type": "string",
            "x-case-insensitive": true,
            "x-struct": null,
            "x-validate": "Elixir.ReturnBear.Utils.OpenApiSpexBuilder.CaseInsensitiveEnumValidator"
          },
          "happened_at": {
            "description": "When the fulfillment event happened.",
            "format": "date-time",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "event_type",
          "happened_at",
          "data"
        ],
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentWebhookEvent",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.TrackingEvent": {
        "properties": {
          "occurred_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "origin_location": {
            "$ref": "#/components/schemas/ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.TrackingEvent.Location",
            "nullable": true
          },
          "status": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.TrackingEvent",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.TrackingEvent.Location": {
        "properties": {
          "city": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "country_code": {
            "enum": [
              "AD",
              "AE",
              "AF",
              "AG",
              "AI",
              "AL",
              "AM",
              "AO",
              "AQ",
              "AR",
              "AS",
              "AT",
              "AU",
              "AW",
              "AX",
              "AZ",
              "BA",
              "BB",
              "BD",
              "BE",
              "BF",
              "BG",
              "BH",
              "BI",
              "BJ",
              "BL",
              "BM",
              "BN",
              "BO",
              "BQ",
              "BR",
              "BS",
              "BT",
              "BV",
              "BW",
              "BY",
              "BZ",
              "CA",
              "CC",
              "CD",
              "CF",
              "CG",
              "CH",
              "CI",
              "CK",
              "CL",
              "CM",
              "CN",
              "CO",
              "CR",
              "CU",
              "CV",
              "CW",
              "CX",
              "CY",
              "CZ",
              "DE",
              "DJ",
              "DK",
              "DM",
              "DO",
              "DZ",
              "EC",
              "EE",
              "EG",
              "EH",
              "ER",
              "ES",
              "ET",
              "FI",
              "FJ",
              "FK",
              "FM",
              "FO",
              "FR",
              "GA",
              "GB",
              "GD",
              "GE",
              "GF",
              "GG",
              "GH",
              "GI",
              "GL",
              "GM",
              "GN",
              "GP",
              "GQ",
              "GR",
              "GT",
              "GU",
              "GW",
              "GY",
              "HK",
              "HM",
              "HN",
              "HR",
              "HT",
              "HU",
              "ID",
              "IE",
              "IL",
              "IM",
              "IN",
              "IO",
              "IQ",
              "IR",
              "IS",
              "IT",
              "JE",
              "JM",
              "JO",
              "JP",
              "KE",
              "KG",
              "KH",
              "KI",
              "KM",
              "KN",
              "KP",
              "KR",
              "KW",
              "KY",
              "KZ",
              "LA",
              "LB",
              "LC",
              "LI",
              "LK",
              "LR",
              "LS",
              "LT",
              "LU",
              "LV",
              "LY",
              "MA",
              "MC",
              "MD",
              "ME",
              "MF",
              "MG",
              "MH",
              "MK",
              "ML",
              "MM",
              "MN",
              "MO",
              "MP",
              "MQ",
              "MR",
              "MS",
              "MT",
              "MU",
              "MV",
              "MW",
              "MX",
              "MY",
              "MZ",
              "NA",
              "NC",
              "NE",
              "NF",
              "NG",
              "NI",
              "NL",
              "NO",
              "NP",
              "NR",
              "NU",
              "NZ",
              "OM",
              "PA",
              "PE",
              "PF",
              "PG",
              "PH",
              "PK",
              "PL",
              "PM",
              "PN",
              "PR",
              "PS",
              "PT",
              "PW",
              "PY",
              "QA",
              "RE",
              "RO",
              "RS",
              "RU",
              "RW",
              "SA",
              "SB",
              "SC",
              "SD",
              "SE",
              "SG",
              "SH",
              "SI",
              "SJ",
              "SK",
              "SL",
              "SM",
              "SN",
              "SO",
              "SR",
              "SS",
              "ST",
              "SV",
              "SX",
              "SY",
              "SZ",
              "TC",
              "TD",
              "TF",
              "TG",
              "TH",
              "TJ",
              "TK",
              "TL",
              "TM",
              "TN",
              "TO",
              "TR",
              "TT",
              "TV",
              "TW",
              "TZ",
              "UA",
              "UG",
              "UM",
              "US",
              "UY",
              "UZ",
              "VA",
              "VC",
              "VE",
              "VG",
              "VI",
              "VN",
              "VU",
              "WF",
              "WS",
              "YE",
              "YT",
              "ZA",
              "ZM",
              "ZW",
              "UK"
            ],
            "nullable": true,
            "type": "string",
            "x-case-insensitive": true,
            "x-struct": null,
            "x-validate": "Elixir.ReturnBear.Utils.OpenApiSpexBuilder.CaseInsensitiveEnumValidator"
          },
          "name": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "postal_code": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "province": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.TrackingEvent.Location",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Origin": {
        "properties": {
          "sender_id": {
            "format": "int64",
            "nullable": true,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "sender_name": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "sender_type": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Origin",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Document": {
        "properties": {
          "content_type": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "expiry_date": {
            "format": "date-time",
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "url": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Document",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Return": {
        "properties": {
          "external_references": {
            "items": {
              "$ref": "#/components/schemas/ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Return.ExternalReference"
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "short_uid": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "external_references"
        ],
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Return",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload": {
        "properties": {
          "courier": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "description": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "destination": {
            "$ref": "#/components/schemas/ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Destination",
            "nullable": true
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Document"
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "id": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "occurred_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "origin": {
            "$ref": "#/components/schemas/ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Origin",
            "nullable": true
          },
          "returns": {
            "items": {
              "$ref": "#/components/schemas/ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Return"
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "tracking_events": {
            "items": {
              "$ref": "#/components/schemas/ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.TrackingEvent"
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "tracking_number": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "tracking_status": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "returns",
          "tracking_events",
          "documents"
        ],
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Destination": {
        "properties": {
          "recipient_id": {
            "format": "int64",
            "nullable": true,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "recipient_name": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "recipient_type": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Destination",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Return.ExternalReference": {
        "properties": {
          "type": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "value": {
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "title": "ReturnBear.Webhooks.Payloads.FulfillmentEventPayload.Return.ExternalReference",
        "type": "object",
        "x-struct": null,
        "x-validate": null
      }
    }
  },
  "info": {
    "title": "ReturnBear Partner API",
    "version": "1.0"
  },
  "openapi": "3.1.0",
  "security": [],
  "servers": [
    {
      "url": "https://partners.returnbear.com",
      "variables": {}
    }
  ],
  "webhooks": {
    "fulfillmentEvent": {
      "post": {
        "callbacks": {},
        "deprecated": false,
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfillmentWebhookEvent"
              }
            }
          },
          "description": "The webhook event payload sent by ReturnBear when the subscribed event occurs.\n\nReturnBear will send an HTTP POST request to your configured webhook URL with this JSON payload.\nYour endpoint should respond with a 2xx status code to acknowledge receipt.\n",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success. Your endpoint should return a 2xx status code to acknowledge receipt.\n\nReturnBear will retry failed webhook deliveries using exponential backoff.\nIf your endpoint consistently returns errors, the webhook may be automatically disabled.\n"
          }
        },
        "tags": []
      }
    }
  }
}
```