Anfrage zur Erhöhung des Ausgabenlimits genehmigen
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve
Genehmigt eine ausstehende Anfrage zur Erhöhung des Ausgabenlimits.
Schreibt ein Ausgabenlimit pro Benutzer in Höhe von amount für den
Anfragenden und versetzt die Anfrage in den Status approved. period
ist standardmäßig der Zeitraum, in dem das Mitglied blockiert wurde.
Anthropic benachrichtigt den Anfragenden per E-Mail, sofern
suppress_notification nicht gesetzt ist.
Parameters
Returns
Anfrage zur Erhöhung des Ausgabenlimits genehmigen
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.spendlimits.increaserequests.IncreaseRequestApproveParams;
import com.anthropic.models.beta.organization.spendlimits.increaserequests.IncreaseRequestApproveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
IncreaseRequestApproveParams params = IncreaseRequestApproveParams.builder()
.spendLimitIncreaseRequestId("spend_limit_increase_request_id")
.amount("50000")
.build();
IncreaseRequestApproveResponse response = client.beta().organization().spendLimits().increaseRequests().approve(params);
}
}Response 200
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"created_at": "2019-12-27T18:11:19.117Z",
"period": "daily",
"resolved_at": "2019-12-27T18:11:19.117Z",
"resolved_by": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_limit": {
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"is_enabled": true,
"period": "daily",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
},
"spend_summary": {
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"amount": "50000",
"currency": "USD",
"period": "daily",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"source": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_limit_id": "spend_limit_id"
},
"status": "approved",
"type": "spend_limit_increase_request"
}Returns Examples
Response 200
{
"id": "id",
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"created_at": "2019-12-27T18:11:19.117Z",
"period": "daily",
"resolved_at": "2019-12-27T18:11:19.117Z",
"resolved_by": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_limit": {
"id": "id",
"amount": "50000",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "USD",
"is_enabled": true,
"period": "daily",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"type": "spend_limit",
"updated_at": "2019-12-27T18:11:19.117Z"
},
"spend_summary": {
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"amount": "50000",
"currency": "USD",
"period": "daily",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"source": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_limit_id": "spend_limit_id"
},
"status": "approved",
"type": "spend_limit_increase_request"
}