Skip to main content

Retrieve user and company IDs

To create payment methods, you need the user and company ID of the future payment method owner. To retrieve the IDs, use the Payment Method REST API. The following endpoints return all marketplace users and companies, respectively.

  • GET /api/account/v2/users

  • GET /api/account/v2/companies

Retrieve user IDs

Use the List all users request to list all marketplace users.

GET /api/account/v2/users

You can search the results for the desired user's name. In the response, the uuid property contains the user ID that you need for subsequent API requests.

Example

curl -X GET \
https://example.byappdirect.com/api/account/v2/users\
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \

Response (some fields omitted for brevity)

{
"links": [],
"content": [
{
"uuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
"email": "jsmith@example.com",
"userName": "jsmith@example.com",
"firstName": "John",
"lastName": "Smith",
...
"openId": "https://example.byappdirect.com/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
},
...
}

Retrieve company IDs

Use the List all companies request to list all marketplace companies.

GET /api/account/v2/companies

You can search the results for the desired company by name. In the response, the first uuid property contains the company ID that you need for subsequent API requests.

Example

curl -X GET \
https://example.byappdirect.com/api/account/v2/companies \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \

Response (some fields omitted for brevity)

{
"links": [],
"content": [
...
{
"uuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
"name": "Appdirect",
"enabled": true,
"address": {
"street1": "50 Grove St.",
"street2": "",
"city": "Somerville",
"state": "MA",
"zip": "02114",
"country": "US"
},
...
}
],
"page": {
"size": 100,
"totalElements": 2171,
"totalPages": 22,
"number": 0
},
...
}

Was this page helpful?