Method: subscriptions.delete
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
정기 결제를 취소, 정지 또는 트랜스퍼합니다.
HTTP 요청
DELETE https://reseller.googleapis.com/apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
customerId |
string
고객의 기본 도메인 이름 또는 고객의 고유 식별자일 수 있습니다. 고객의 도메인 이름이 변경되면 이전 도메인 이름을 사용하여 고객에 액세스할 수 없지만 API에서 반환한 고객의 고유 식별자는 항상 사용할 수 있습니다. 해당하는 경우 고유 식별자를 시스템에 저장하는 것이 좋습니다.
|
subscriptionId |
string
필수 속성입니다. subscriptionId 는 정기 결제 식별자이며 고객마다 고유합니다. 구독이 업데이트될 때 subscriptionId 가 변경되므로 이 ID를 영구 데이터의 키로 사용하지 않는 것이 좋습니다. subscriptionId 는 모든 리셀러 구독 가져오기 메서드를 사용하여 찾을 수 있습니다.
|
쿼리 매개변수
매개변수 |
deletionType |
enum (DeletionType )
deletionType 쿼리 문자열을 사용하면 정기 결제를 취소, 다운그레이드 또는 정지할 수 있습니다.
|
응답 본문
임의의 HTTP 본문을 나타내는 메시지입니다. 원시 바이너리나 HTML 페이지와 같이 JSON으로 표현할 수 없는 페이로드 형식에만 사용해야 합니다.
이 메시지는 요청과 응답에서 스트리밍 및 스트리밍이 아닌 API 메소드에 모두 사용될 수 있습니다.
또한 최상위 요청 필드로 사용할 수 있으며, URL 또는 HTTP 템플릿에서 요청 필드로 매개변수를 추출하려는 경우와 원시 HTTP 본문에 액세스하려는 경우 편리하게 사용할 수 있습니다.
예:
message GetResourceRequest {
// A unique request id.
string requestId = 1;
// The raw HTTP body is bound to this field.
google.api.HttpBody http_body = 2;
}
service ResourceService {
rpc GetResource(GetResourceRequest)
returns (google.api.HttpBody);
rpc UpdateResource(google.api.HttpBody)
returns (google.protobuf.Empty);
}
스트리밍 메소드의 예:
service CaldavService {
rpc GetCalendar(stream google.api.HttpBody)
returns (stream google.api.HttpBody);
rpc UpdateCalendar(stream google.api.HttpBody)
returns (stream google.api.HttpBody);
}
이 유형을 사용하면 요청 및 응답 본문을 처리하는 방법만 변경되며, 다른 모든 기능은 변경되지 않고 계속 작동합니다.
성공한 경우 응답은 형식이 메서드에 의해 정의되는 일반 HTTP 응답입니다.
JSON 표현 |
{
"contentType": string,
"data": string,
"extensions": [
{
"@type": string,
field1: ...,
...
}
]
} |
필드 |
contentType |
string
본문의 콘텐츠 유형을 지정하는 HTTP Content-Type 헤더 값입니다.
|
data |
string (bytes format)
원시 바이너리인 HTTP 요청/응답 본문입니다. base64 인코딩 문자열입니다.
|
extensions[] |
object
애플리케이션별 응답 메타데이터입니다. 스트리밍 API의 첫 번째 응답에서 설정되어야 합니다. 임의 유형의 필드를 포함하는 객체입니다. 추가 필드 "@type" 은 유형을 식별하는 URI를 포함합니다. 예: { "id": 1234, "@type": "types.example.com/standard/id" }
|
승인 범위
다음 OAuth 범위가 필요합니다.
https://www.googleapis.com/auth/apps.order
자세한 내용은 승인 가이드를 참고하세요.
DeletionType
열거형 |
deletion_type_undefined |
|
cancel |
구독을 즉시 취소합니다. G Suite 구독에는 적용되지 않습니다. |
transfer_to_direct |
구독을 Google로 직접 이전합니다. 고객은 즉시 Google과의 직접 결제 관계로 전환되며 서비스가 중단되지 않고 짧은 시간 동안만 유지됩니다. 그러면 고객은 신용카드를 사용하여 Google에서 직접 결제를 설정하거나 다른 리셀러로 이전할 수 있습니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# Method: subscriptions.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.HttpBody.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [DeletionType](#DeletionType)\n- [Try it!](#try-it)\n\nCancels, suspends, or transfers a subscription to direct.\n\n### HTTP request\n\n`DELETE https://reseller.googleapis.com/apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customerId` | `string` This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable. |\n| `subscriptionId` | `string` This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the [retrieve all reseller subscriptions](https://developers.google.com/workspace/admin/reseller/v1/how-tos/manage_subscriptions#get_all_subscriptions) method. |\n\n### Query parameters\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `deletionType` | `enum (`[DeletionType](/workspace/admin/reseller/reference/rest/v1/subscriptions/delete#DeletionType)`)` The `deletionType` query string enables the cancellation, downgrade, or suspension of a subscription. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nMessage that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page.\n\nThis message can be used both in streaming and non-streaming API methods in the request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body.\n\nExample: \n\n message GetResourceRequest {\n // A unique request id.\n string requestId = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest)\n returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody)\n returns (google.protobuf.Empty);\n\n }\n\nExample with streaming methods: \n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n\n }\n\nUse of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.\n\nIf successful, the response is a generic HTTP response whose format is defined by the method.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------|\n| ``` { \"contentType\": string, \"data\": string, \"extensions\": [ { \"@type\": string, field1: ..., ... } ] } ``` |\n\n| Fields ||\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `contentType` | `string` The HTTP Content-Type header value specifying the content type of the body. |\n| `data` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The HTTP request/response body as raw binary. A base64-encoded string. |\n| `extensions[]` | `object` Application specific response metadata. Must be set in the first response for streaming APIs. An object containing fields of an arbitrary type. An additional field `\"@type\"` contains a URI identifying the type. Example: `{ \"id\": 1234, \"@type\": \"types.example.com/standard/id\" }`. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/apps.order`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nDeletionType\n------------\n\n| Enums ||\n|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `deletion_type_undefined` | |\n| `cancel` | Cancels the subscription immediately. This does not apply to a G Suite subscription. |\n| `transfer_to_direct` | Transfers a subscription directly to Google. The customer is immediately transferred to a direct billing relationship with Google and is given a short amount of time with no service interruption. The customer can then choose to set up billing directly with Google by using a credit card, or they can transfer to another reseller. |"]]