{
  "info": {
    "name": "Refunds",
    "_postman_id": "63b2dee9-d9a1-d422-ab90-21fa6887262a",
    "description": "The Refunds API provides operations for managing refund requests on the Guile platform.\nCustomers can request refunds for appointments, and businesses can approve or deny these requests.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{bearerToken}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.guile.app",
      "type": "string",
      "description": "Base URL for this API collection"
    },
    {
      "key": "bearerToken",
      "value": "",
      "type": "string",
      "description": "Bearer token for authenticated requests in this collection"
    }
  ],
  "item": [
    {
      "id": "71ac1600-8529-fd34-fb9f-a6bd352922f4",
      "name": "Refunds",
      "description": "Request, approve, or deny returns of captured funds",
      "item": [
        {
          "id": "eb2b87c8-be31-e0a5-d6e9-7bcfb90b2b48",
          "name": "List refund requests",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/refunds",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "refunds"
              ],
              "query": [
                {
                  "key": "state",
                  "value": "{{state}}",
                  "description": "Filter by refund request state."
                },
                {
                  "key": "appointmentId",
                  "value": "{{appointmentId}}",
                  "description": "Filter by specific appointment."
                }
              ]
            },
            "description": "List refund requests visible to the caller."
          }
        },
        {
          "id": "9b879d3c-3e58-7b20-0671-8571441bda5a",
          "name": "Request a refund",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{Idempotency-Key}}",
                "description": "A client-generated idempotency key to ensure operations are only processed once\neven if a client retries the operation.\nThe V4 UUID format, as defined in [RFC 4122](https://tools.ietf.org/html/rfc4122), is\nrecommended to avoid collisions but is not required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/refunds",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "refunds"
              ]
            },
            "description": "Open a refund request for a captured appointment payment."
          }
        },
        {
          "id": "4ea87db2-8b91-1934-a1c5-40f0be9cb970",
          "name": "Get a refund request",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/refunds/:refundRequestId",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "refunds",
                ":refundRequestId"
              ],
              "variable": [
                {
                  "key": "refundRequestId",
                  "value": "{{refundRequestId}}"
                }
              ]
            },
            "description": "Return one refund request and its state."
          }
        },
        {
          "id": "f15c2c9a-8c74-b13c-75fe-518179a3389e",
          "name": "Approve a refund request",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{Idempotency-Key}}",
                "description": "A client-generated idempotency key to ensure operations are only processed once\neven if a client retries the operation.\nThe V4 UUID format, as defined in [RFC 4122](https://tools.ietf.org/html/rfc4122), is\nrecommended to avoid collisions but is not required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/refunds/:refundRequestId/approved",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "refunds",
                ":refundRequestId",
                "approved"
              ],
              "variable": [
                {
                  "key": "refundRequestId",
                  "value": "{{refundRequestId}}"
                }
              ]
            },
            "description": "Approve a pending refund request and return the captured funds."
          }
        },
        {
          "id": "29039fc6-018e-bc1c-5fa6-4c596815b466",
          "name": "Deny a refund request",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{Idempotency-Key}}",
                "description": "A client-generated idempotency key to ensure operations are only processed once\neven if a client retries the operation.\nThe V4 UUID format, as defined in [RFC 4122](https://tools.ietf.org/html/rfc4122), is\nrecommended to avoid collisions but is not required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/refunds/:refundRequestId/denied",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "refunds",
                ":refundRequestId",
                "denied"
              ],
              "variable": [
                {
                  "key": "refundRequestId",
                  "value": "{{refundRequestId}}"
                }
              ]
            },
            "description": "Deny a pending refund request."
          }
        }
      ]
    }
  ]
}