Loading...

GET /api/users/countries

If you are building a form for adding a team member, use this request to offer the countries Factory IL GPS accepts for their profile. An administrator with access to Users can request the catalogue without specifying a particular sub-user.

The response pairs each country name with its code. Display the name so the person can choose it, then send the key in country when creating or updating the sub-user. For Colombia, for example, send CO.

Request Details

GET /api/users/countries

Request Parameters

Send this request without parameters or a body.

Authentication Required

Send the access token in the Authorization: Bearer <token> header. See Authentication.

Requires an administrator with access to Users.

Example Request

GET /api/users/countries HTTP/1.1 Host: api.plaspy.com Authorization: Bearer {token}

Response Parameters

The countries object maps each country code to its name. Send the key in the user request. In the example, the key is CO.

FieldTypePresenceDescription
countriesString mapAlwaysString mapAlwaysEach key is a country code and its value is the display name.
apiUsageIntegerAlwaysIntegerAlwaysUnits charged for this request.
apiDailyUsageIntegerAlwaysIntegerAlwaysAPI units the user had used today before this request.

Example HTTP 200 response (excerpt)

{ "countries": { "CO": "Colombia" } }

Errors

FieldTypePresenceDescription
successBooleanDepends on the errorBooleanDepends on the errorIn the operation errors shown here, the value is false.
errorStringDepends on the errorStringDepends on the errorMessage explaining why the request was rejected.
  • HTTP 401 if a valid Bearer token is missing.
  • HTTP 403 if the user lacks the required permission. The reason appears in error.

Example error

{ "success": false, "error": "Your user does not have permission to do this." }
Index
Last modification: 2026-11-30 22:49:23