{
    "info": {
        "name": "FlyRail API",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
        "description": "Generated from the OpenAPI spec. Set the sandbox base_url and your test key."
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{api_key}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://sandbox-api.flyrail.space/v1"
        },
        {
            "key": "api_key",
            "value": "fr_test_sk_..."
        }
    ],
    "item": [
        {
            "name": "ping",
            "item": [
                {
                    "name": "Check your key and environment",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/ping",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "ping"
                            ],
                            "variable": []
                        }
                    }
                }
            ]
        },
        {
            "name": "airports",
            "item": [
                {
                    "name": "List airports",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/airports",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "airports"
                            ],
                            "variable": []
                        }
                    }
                }
            ]
        },
        {
            "name": "airlines",
            "item": [
                {
                    "name": "List airlines available to your key's environment",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/airlines",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "airlines"
                            ],
                            "variable": []
                        }
                    }
                }
            ]
        },
        {
            "name": "flights",
            "item": [
                {
                    "name": "Search flights (scope `search`)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/flights/search",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "flights",
                                "search"
                            ],
                            "variable": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "offers",
            "item": [
                {
                    "name": "Price an offer for your exact party (scope `search`)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/offers/:offer/price",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "offers",
                                ":offer",
                                "price"
                            ],
                            "variable": [
                                {
                                    "key": "offer",
                                    "value": ""
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "bookings",
            "item": [
                {
                    "name": "Book and ticket (scope `book`)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "{{$guid}}"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/bookings",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "bookings"
                            ],
                            "variable": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List your bookings (scope `read`)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/bookings",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "bookings"
                            ],
                            "variable": []
                        }
                    }
                },
                {
                    "name": "Get a booking (scope `read`)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/bookings/:booking",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "bookings",
                                ":booking"
                            ],
                            "variable": [
                                {
                                    "key": "booking",
                                    "value": ""
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Cancel a booking (scope `cancel`)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/bookings/:booking/cancel",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "bookings",
                                ":booking",
                                "cancel"
                            ],
                            "variable": [
                                {
                                    "key": "booking",
                                    "value": ""
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get the e-ticket (scope `read`)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/bookings/:booking/ticket",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "bookings",
                                ":booking",
                                "ticket"
                            ],
                            "variable": [
                                {
                                    "key": "booking",
                                    "value": ""
                                }
                            ]
                        }
                    }
                }
            ]
        },
        {
            "name": "wallet",
            "item": [
                {
                    "name": "Wallet balances (scope `read`)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/wallet",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "wallet"
                            ],
                            "variable": []
                        }
                    }
                },
                {
                    "name": "Wallet movements, newest first (scope `read`)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/wallet/transactions",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "wallet",
                                "transactions"
                            ],
                            "variable": []
                        }
                    }
                }
            ]
        },
        {
            "name": "webhooks",
            "item": [
                {
                    "name": "Recent webhook deliveries and their status (scope `read`)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks/events",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks",
                                "events"
                            ],
                            "variable": []
                        }
                    }
                }
            ]
        }
    ]
}