Retrieve the invoicing settings for a specific user. This endpoint is for administrators to view any user's invoicing data.
GET/v2/projects/{project_id}/users/{user_id}/invoicing Path Parameters
The unique identifier of the project.
The user ID to get invoicing settings for.
curl -X GET "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/users/123456789012345678/invoicing" \
-H "Authorization: Bearer YOUR_TOKEN"
const project_id = 'YOUR_PROJECT_ID';
const user_id = '123456789012345678';
const response = await fetch(`https://api.botsubscription.com/v2/projects/${project_id}/users/${user_id}/invoicing`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
import requests
project_id = 'YOUR_PROJECT_ID'
user_id = '123456789012345678'
response = requests.get(
f'https://api.botsubscription.com/v2/projects/{project_id}/users/{user_id}/invoicing',
headers={'Authorization': 'Bearer YOUR_TOKEN'}
)
data = response.json()
$project_id = 'YOUR_PROJECT_ID';
$user_id = '123456789012345678';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.botsubscription.com/v2/projects/{$project_id}/users/{$user_id}/invoicing");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_TOKEN']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Successapplication/json
{
"ok": true,
"request_id": "11111111-1111-1111-1111-111111111111",
"method": "GET",
"path": "/v2/projects/YOUR_PROJECT_ID/users/123456789012345678/invoicing",
"code": 200,
"data": {
"name": "John Doe",
"email": "[email protected]",
"address": "123 Main St",
"city": "New York",
"region": "NY",
"postal": "10001",
"country": "US",
"vat_number": null
}
}
No invoicing data setapplication/json
{
"ok": true,
"request_id": "11111111-1111-1111-1111-111111111111",
"method": "GET",
"path": "/v2/projects/YOUR_PROJECT_ID/users/123456789012345678/invoicing",
"code": 200,
"data": {
"name": null,
"email": null,
"address": null,
"city": null,
"region": null,
"postal": null,
"country": null,
"vat_number": null
}
}
User not foundapplication/json
{
"ok": false,
"request_id": "11111111-1111-1111-1111-111111111111",
"method": "GET",
"path": "/v2/projects/YOUR_PROJECT_ID/users/123456789012345678/invoicing",
"code": 404,
"error": {
"error_code": "NOT_FOUND",
"message": "User not found"
}
}
Last updated: