# /getAvailableUsers

[block:api-header]
{
  "title": "Description:"
}
[/block]

This functionality allows you to get all available users within the system.

**Note**
Best practise is to cache this information and reload the availableUsers periodically (for example: once a day).

**HMAC calculation**
Base64 encode -  SHA256 (apiKey + environment)

* Sort the sign data alphabetical ascending, you can also find the sequence on the concerned API specification page.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Global Reseller",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://globalreseller.nl/webservices/"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/getAvailableUsers": {
      "post": {
        "summary": "/getAvailableUsers",
        "description": "",
        "operationId": "getavailableusers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apiKey",
                  "environment",
                  "HMACKey"
                ],
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "description": "public apiKey"
                  },
                  "environment": {
                    "type": "string",
                    "description": "\"test\" or \"production\"",
                    "enum": [
                      "production",
                      "test"
                    ]
                  },
                  "HMACKey": {
                    "type": "string",
                    "description": "HMACKey is calculated based on the input fields"
                  }
                }
              },
              "examples": {
                "Example input": {
                  "value": {
                    "apiKey": "PUT-YOUR-PUBLIC-API-KEY-HERE",
                    "environment": "test",
                    "HMACKey": "PUT-YOUR-CALCULATED-HMAC-KEY-HERE"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Success": {
                    "value": "{\n  \"success\": true,\n  \"users\": [\n    {\n      \"userId\": \"1\",\n      \"userName\": \"Van Gogh Museum\",\n      \"userAddress\": {\n        \"streetName\": \"Museumplein\",\n        \"houseNumber\": \"6\",\n        \"postalCode\": \"1071 DJ\",\n        \"cityName\": \"Amsterdam\",\n        \"country\": \"NL\"\n      },\n      \"userCoordinates\": {\n        \"latitude\": \"52.3584088\",\n        \"longitude\": \"4.8815176\"\n      },\n      \"userPhoneNumber\": \"020 570 5200\",\n      \"userWebsite\": \"http://www.vangoghmuseum.nl/\",\n      \"userImages\": {\n        \"logo\": \"https://globalreseller.nl/web/image.php?path=clientsavatars/594c9b23bee5674a6.png\"\n       },\n      \"userTerms\": \"https://www.artis.nl/nl/footer/algemene-voorwaarden/online-kaartverkoop/\"\n      }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string",
                            "example": "1"
                          },
                          "userName": {
                            "type": "string",
                            "example": "Van Gogh Museum"
                          },
                          "userAddress": {
                            "type": "object",
                            "properties": {
                              "streetName": {
                                "type": "string",
                                "example": "Museumplein"
                              },
                              "houseNumber": {
                                "type": "string",
                                "example": "6"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "1071 DJ"
                              },
                              "cityName": {
                                "type": "string",
                                "example": "Amsterdam"
                              },
                              "country": {
                                "type": "string",
                                "example": "NL"
                              }
                            }
                          },
                          "userCoordinates": {
                            "type": "object",
                            "properties": {
                              "latitude": {
                                "type": "string",
                                "example": "52.3584088"
                              },
                              "longitude": {
                                "type": "string",
                                "example": "4.8815176"
                              }
                            }
                          },
                          "userPhoneNumber": {
                            "type": "string",
                            "example": "020 570 5200"
                          },
                          "userWebsite": {
                            "type": "string",
                            "example": "http://www.vangoghmuseum.nl/"
                          },
                          "userImages": {
                            "type": "object",
                            "properties": {
                              "logo": {
                                "type": "string",
                                "example": "https://globalreseller.nl/web/image.php?path=clientsavatars/594c9b23bee5674a6.png"
                              }
                            }
                          },
                          "userTerms": {
                            "type": "string",
                            "example": "https://www.artis.nl/nl/footer/algemene-voorwaarden/online-kaartverkoop/"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "4XX",
            "content": {
              "application/json": {
                "examples": {
                  "Error": {
                    "value": "{\n   \"success\":false,\n   \"error message\":\"text\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "error message": {
                      "type": "string",
                      "example": "text"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Cache-Control",
        "value": "no-cache"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "62b068c7795387013326be5c:62b08af8c65279004fcab7af"
}
```