{
  "openapi": "3.1.0",
  "info": {
    "title": "Whish Money Cash Collection Locations",
    "version": "1.0.0",
    "description": "Look up the governorates, districts, and shops where a beneficiary can collect a Cash Collection transfer in Lebanon. Same platform and credentials as International Money Transfer."
  },
  "servers": [
    {
      "url": "https://sandbox.woocash.money/api",
      "description": "Sandbox"
    },
    {
      "url": "https://api.woocash.money",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "usernameAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "username"
      },
      "keyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "key"
      }
    }
  },
  "security": [
    {
      "usernameAuth": [],
      "keyAuth": []
    }
  ],
  "paths": {
    "/api/governorates": {
      "get": {
        "summary": "List governorates and districts",
        "description": "Returns every governorate with its districts. Use the ids to filter List shops.",
        "responses": {
          "200": {
            "description": "Standard response envelope.",
            "content": {
              "application/json": {
                "example": {
                  "status": true,
                  "code": null,
                  "dialog": null,
                  "extra": null,
                  "data": [
                    {
                      "id": 3,
                      "label": "Beirut",
                      "districts": [
                        {
                          "id": 4,
                          "governorate": "LB-BA",
                          "label": "Beirut"
                        }
                      ]
                    },
                    {
                      "id": 5,
                      "label": "Mount Lebanon",
                      "districts": [
                        {
                          "id": 9,
                          "governorate": "LB-JL",
                          "label": "Baabda"
                        },
                        {
                          "id": 13,
                          "governorate": "LB-JL",
                          "label": "Matn"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Request-id",
            "in": "header",
            "required": true,
            "description": "Mint a NEW `Request-id` for every new transfer, and NUMERIC only (Long) - the API rejects non-numeric values. Use for example epoch milliseconds plus a counter, and store it before you send. To recover from a TIMEOUT, resend the identical request with the SAME `Request-id`: if it never arrived the transfer is created, and if it did, nothing is duplicated and the resend answers `transfer.already.done` - then call Get transfer status with that `requestId` to read the outcome. Retrying with a fresh `Request-id` is what creates duplicates.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shops": {
      "get": {
        "summary": "List shops",
        "description": "Returns collection points (agents and Whish Money branches). Optional governorateId / districtId narrow the list to an area; omit both to return all.",
        "responses": {
          "200": {
            "description": "Standard response envelope.",
            "content": {
              "application/json": {
                "example": {
                  "status": true,
                  "code": null,
                  "dialog": null,
                  "extra": null,
                  "data": [
                    {
                      "id": 2,
                      "name": "TALACO - RAOUCHE",
                      "address": "Beirut, Beirut, Raouche, Australia, Alyaa Bld",
                      "phone": "+961 1 809 555",
                      "latitude": 33.88784,
                      "longitude": 35.475079,
                      "workingHours": null,
                      "url": "https://whish.money/branch.php?id=2pkl1154715079",
                      "type": "Whish Money Branches"
                    },
                    {
                      "id": 118,
                      "name": "BAGHDADI TRADING EST",
                      "address": "Beirut, Beirut, Hamra, Liion Street, Al Chaikha Resto",
                      "phone": "+961 1 345 312",
                      "latitude": 33.901352,
                      "longitude": 35.492748,
                      "workingHours": null,
                      "url": "https://whish.money/branch.php?id=76pkl1187033986",
                      "type": "Normal"
                    }
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Request-id",
            "in": "header",
            "required": true,
            "description": "Mint a NEW `Request-id` for every new transfer, and NUMERIC only (Long) - the API rejects non-numeric values. Use for example epoch milliseconds plus a counter, and store it before you send. To recover from a TIMEOUT, resend the identical request with the SAME `Request-id`: if it never arrived the transfer is created, and if it did, nothing is duplicated and the resend answers `transfer.already.done` - then call Get transfer status with that `requestId` to read the outcome. Retrying with a fresh `Request-id` is what creates duplicates.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "governorateId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "districtId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}