{
  "info": {
    "_postman_id": "8f35f2b0-cf9d-42ef-8c7e-a7e7f7e4a5de",
    "name": "Destino Tour API",
    "description": "Collection for partner onboarding against the public Destino Tour API.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://destinotour.com"
    },
    {
      "key": "apiKey",
      "value": ""
    },
    {
      "key": "circuitSlug",
      "value": "encantos-de-europa-insignia"
    },
    {
      "key": "departureId",
      "value": "cmobt3zxw000aegoaual0bse2"
    },
    {
      "key": "reservationReference",
      "value": "RSV-260424-0BF227"
    },
    {
      "key": "idempotencyKey",
      "value": "partner-123-order-987"
    }
  ],
  "item": [
    {
      "name": "Healthcheck",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/health",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "health"
          ]
        }
      }
    },
    {
      "name": "OpenAPI",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/v1/openapi",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "openapi"
          ]
        }
      }
    },
    {
      "name": "Circuits",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/circuits",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "circuits"
          ]
        }
      }
    },
    {
      "name": "Circuit Detail",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/circuits/{{circuitSlug}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "circuits",
            "{{circuitSlug}}"
          ]
        }
      }
    },
    {
      "name": "Departures",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/departures?circuit={{circuitSlug}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "departures"
          ],
          "query": [
            {
              "key": "circuit",
              "value": "{{circuitSlug}}"
            }
          ]
        }
      }
    },
    {
      "name": "Create Reservation",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}",
            "type": "text"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"departureId\": \"{{departureId}}\",\n  \"customerName\": \"Juan Perez\",\n  \"customerEmail\": \"juan.perez@example.com\",\n  \"customerPhone\": \"+34638875747\",\n  \"passengerCount\": 2,\n  \"adults\": 2,\n  \"children\": 0,\n  \"externalReference\": \"ORDER-987\",\n  \"notes\": \"Reserva desde integracion partner\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/reservations",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "reservations"
          ]
        }
      }
    },
    {
      "name": "Reservation Status",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/reservations/{{reservationReference}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "reservations",
            "{{reservationReference}}"
          ]
        }
      }
    },
    {
      "name": "Find Reservation by External Reference",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/reservations?externalReference=ORDER-987",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "reservations"
          ],
          "query": [
            {
              "key": "externalReference",
              "value": "ORDER-987"
            }
          ]
        }
      }
    },
    {
      "name": "Update Reservation Metadata",
      "request": {
        "method": "PATCH",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"externalReference\": \"ORDER-987-UPDATED\",\n  \"notes\": \"Actualización operativa del partner\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/reservations/{{reservationReference}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "reservations",
            "{{reservationReference}}"
          ]
        }
      }
    },
    {
      "name": "Cancel Reservation",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"reason\": \"Cancelación solicitada por el partner\",\n  \"notes\": \"Prueba de cancelación\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/reservations/{{reservationReference}}/cancel",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "reservations",
            "{{reservationReference}}",
            "cancel"
          ]
        }
      }
    }
  ]
}
