All Products
Search
Document Center

PolarDB:CreateGwConsumerOrder

Last Updated:Aug 04, 2026

Places an order to purchase a token resource plan and activates a redemption code.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

GatewayId

string

Yes

The ID of the AI gateway instance.

pg-2ze24rr575j5b18cg

PackageSpec

string

Yes

The number of credits per API key. The value is a positive integer string.

3000

KeyCount

integer

Yes

The number of API keys to generate (the number of capacity plans to order). Valid values: 1 to 30.

6

ExpireTime

string

No

The expiration time of the API key in ISO-8601 format. The value must be later than the current time.

2027-07-23T03:09:08Z

ClientToken

string

No

The idempotency token.

6000170000591aed949d0f54a343f1a42***********

RegionId

string

Yes

The region ID.

Note

You can call the DescribeRegions operation to query region information.

cn-beijing

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

A7E6A8FD-C50B-46B2-BA85-D8B8D3******

OrderId

string

The order ID returned after the order is placed.

2035638*******

CreditToken

string

The redemption code used for subsequent activation.

"9"

GatewayId

string

The ID of the AI gateway instance.

pg-2ze24rr575j5b18cg

ExpireTime

string

The expiration time.

2020-11-14T16:00:00Z

Examples

Success response

JSON format

{
  "RequestId": "A7E6A8FD-C50B-46B2-BA85-D8B8D3******",
  "OrderId": "2035638*******",
  "CreditToken": "\"9\"",
  "GatewayId": "pg-2ze24rr575j5b18cg",
  "ExpireTime": "2020-11-14T16:00:00Z"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.