Açıklamalar İngilizce
Issue gift codes
Issues gift codes at the reseller's personal discount, paid from the reseller balance. The response carries the batch with the FULL codes.
Body: nominals — code nominals in LMC (strings or numbers), one per code.
Idempotency: send the Idempotency-Key header (1–64 characters A-Z a-z 0-9 _ . : -)
so that a network retry cannot issue a second batch. A retry with the same key and the
same nominals returns the original batch — 200 plus the Idempotent-Replayed: true
header, and the balance is not charged again; the same key with different nominals gives
422 idempotency_key_mismatch.
Key permission: reseller.write.
Bu sayfada(4)
Parametreler
Giriş alanları doğrudan istek satırında yer alır: bir değer girin, hazır URL'yi alın. Aşağıda her parametrenin türü, zorunlu olup olmadığı ve izin verilen değerleri var.
İstek gövdesi
Issuing codes from the reseller balance. The Idempotency-Key header is optional but
recommended: with it a network retry cannot issue a second batch.
{
"nominals": [
1
]
}Alanlar
Code nominals in LMC, one number per code: as many codes as elements. Numbers and decimal strings are accepted; a nominal is either one of the presets from GET /reseller/settings or between min_nominal and max_nominal. The number of elements is capped by limits.max_codes_per_issue from GET /reseller.
Olası yanıtlar
200A replay by Idempotency-Key: the original batch, with the Idempotent-Replayed: true header; the balance is not charged again.
A replay by Idempotency-Key: the original batch, with the Idempotent-Replayed: true header; the balance is not charged again.
{
"success": true,
"message": "string",
"data": {
"uuid": "string",
"source": "string",
"codes_count": "string",
"nominal_total": "string",
"nominal_total_formatted": 1,
"cost_total": "string",
"cost_total_formatted": 1,
"discount_bps": 1,
"codes": [
{
"uuid": "string",
"code_masked": "string",
"code": "string",
"nominal": "string",
"nominal_formatted": 1,
"cost": "string",
"cost_formatted": 1,
"discount_bps": 1,
"source": "string",
"funding": "string",
"status": "string",
"activatable_at": "string",
"redeemed_at": "string",
"cancelled_at": "string",
"created_at": "string",
"currency_asset": {
"code": "string",
"precision": 1
}
}
],
"created_at": "string",
"currency_asset": {
"code": "string",
"precision": 1
}
}
}Success flag. Branch on the HTTP status code instead: any 2xx response carries true here, while an error comes back in a different shape that need not contain this field at all.
A human-readable note in the account language. Fine to show to a user; do not parse it — the wording changes without notice and is not an error code.
datazorunluThe issued batch. On a replay by Idempotency-Key (code 200, header Idempotent-Replayed: true) it is the same batch as in the first response; the balance is not charged again.
GiftCodeBatchGiftCodeBatch
The issued batch. On a replay by Idempotency-Key (code 200, header Idempotent-Replayed: true) it is the same batch as in the first response; the balance is not charged again.
The batch id.
Always reseller — the batch was issued from the reseller balance.
How many codes the batch holds.
Sum of the code nominals, LMC minor units.
Sum of the nominals, LMC.
How much was charged to the reseller balance (nominals minus the discount), LMC minor units.
Charged to the reseller balance, LMC.
The reseller personal discount at issue time, basis points (1000 = 10%).
codesisteğe bağlıThe batch codes with the FULL code value — store them: they are bearer money.
array<GiftCode>GiftCode
The batch codes with the FULL code value — store them: they are bearer money.
Code UUID. Use it in the GET /reseller/codes/{uuid} and POST /reseller/codes/{uuid}/cancel paths.
The code with a mask, LUM-****-****-XXXX: safe to show in a UI and to write to logs.
The FULL code value — what the recipient types to redeem it. The reseller public API returns it in the list, on show and on issue. Treat it as a secret: whoever knows the code can redeem it.
The code’s nominal value in minor LMC units: real = nominal / 10^currency_asset.precision. This is how much LMC the redeemer receives.
The same nominal value in whole LMC — a number ready to display.
What the code cost the reseller after the discount, in minor LMC units. Present only for reseller codes (source: reseller).
The same cost in whole LMC. Present only for reseller codes.
The reseller’s discount at the moment of issue, in basis points (100 = 1%). A later change of the personal discount does not affect this code. Present only for reseller codes.
The moment from which the code can be redeemed; until then it is frozen. null means no restriction.
When the code was redeemed. null until it is. The API never reveals who redeemed it.
When the reseller cancelled the code. null if it was not cancelled.
When the code was issued.
currency_assetzorunluThe currency of the amounts in the response — LMC. Use precision to convert amounts in minor units into whole LMC.
object
The currency of the amounts in the response — LMC. Use precision to convert amounts in minor units into whole LMC.
Code of the asset the amounts are expressed in.
How many decimals LMC has: real = value / 10^precision.
When the batch was issued.
currency_assetzorunluThe currency of the amounts in the response — LMC. Use precision to convert amounts in minor units into whole LMC.
object
The currency of the amounts in the response — LMC. Use precision to convert amounts in minor units into whole LMC.
Code of the asset the amounts are expressed in.
How many decimals LMC has: real = value / 10^precision.
201The batch is issued. data holds the batch with the FULL codes in codes[].
The batch is issued. data holds the batch with the FULL codes in codes[].
{
"success": true,
"message": "string",
"data": {
"uuid": "string",
"source": "string",
"codes_count": "string",
"nominal_total": "string",
"nominal_total_formatted": 1,
"cost_total": "string",
"cost_total_formatted": 1,
"discount_bps": 1,
"codes": [
{
"uuid": "string",
"code_masked": "string",
"code": "string",
"nominal": "string",
"nominal_formatted": 1,
"cost": "string",
"cost_formatted": 1,
"discount_bps": 1,
"source": "string",
"funding": "string",
"status": "string",
"activatable_at": "string",
"redeemed_at": "string",
"cancelled_at": "string",
"created_at": "string",
"currency_asset": {
"code": "string",
"precision": 1
}
}
],
"created_at": "string",
"currency_asset": {
"code": "string",
"precision": 1
}
}
}Success flag. Branch on the HTTP status code instead: any 2xx response carries true here, while an error comes back in a different shape that need not contain this field at all.
A human-readable note in the account language. Fine to show to a user; do not parse it — the wording changes without notice and is not an error code.
datazorunluThe issued batch. On a replay by Idempotency-Key (code 200, header Idempotent-Replayed: true) it is the same batch as in the first response; the balance is not charged again.
GiftCodeBatchGiftCodeBatch
The issued batch. On a replay by Idempotency-Key (code 200, header Idempotent-Replayed: true) it is the same batch as in the first response; the balance is not charged again.
The batch id.
Always reseller — the batch was issued from the reseller balance.
How many codes the batch holds.
Sum of the code nominals, LMC minor units.
Sum of the nominals, LMC.
How much was charged to the reseller balance (nominals minus the discount), LMC minor units.
Charged to the reseller balance, LMC.
The reseller personal discount at issue time, basis points (1000 = 10%).
codesisteğe bağlıThe batch codes with the FULL code value — store them: they are bearer money.
array<GiftCode>GiftCode
The batch codes with the FULL code value — store them: they are bearer money.
Code UUID. Use it in the GET /reseller/codes/{uuid} and POST /reseller/codes/{uuid}/cancel paths.
The code with a mask, LUM-****-****-XXXX: safe to show in a UI and to write to logs.
The FULL code value — what the recipient types to redeem it. The reseller public API returns it in the list, on show and on issue. Treat it as a secret: whoever knows the code can redeem it.
The code’s nominal value in minor LMC units: real = nominal / 10^currency_asset.precision. This is how much LMC the redeemer receives.
The same nominal value in whole LMC — a number ready to display.
What the code cost the reseller after the discount, in minor LMC units. Present only for reseller codes (source: reseller).
The same cost in whole LMC. Present only for reseller codes.
The reseller’s discount at the moment of issue, in basis points (100 = 1%). A later change of the personal discount does not affect this code. Present only for reseller codes.
The moment from which the code can be redeemed; until then it is frozen. null means no restriction.
When the code was redeemed. null until it is. The API never reveals who redeemed it.
When the reseller cancelled the code. null if it was not cancelled.
When the code was issued.
currency_assetzorunluThe currency of the amounts in the response — LMC. Use precision to convert amounts in minor units into whole LMC.
object
The currency of the amounts in the response — LMC. Use precision to convert amounts in minor units into whole LMC.
Code of the asset the amounts are expressed in.
How many decimals LMC has: real = value / 10^precision.
When the batch was issued.
currency_assetzorunluThe currency of the amounts in the response — LMC. Use precision to convert amounts in minor units into whole LMC.
object
The currency of the amounts in the response — LMC. Use precision to convert amounts in minor units into whole LMC.
Code of the asset the amounts are expressed in.
How many decimals LMC has: real = value / 10^precision.
409reseller_inactive — the account is blocked; reseller_insufficient_balance — the balance is not enough.
reseller_inactive — the account is blocked; reseller_insufficient_balance — the balance is not enough.
{
"success": false,
"message": "The pay-as-you-go quote is stale — request a fresh one.",
"reason": "quote_mismatch",
"error_code": "quote_mismatch",
"actual_lmc_minor": 380000000,
"quoted_lmc_minor": 360000000
}Always false in error responses.
Error text in the key's language (set through the X-Locale header).
Machine-readable failure reason — branch on this, not on the message text.
The same machine-readable code as in reason — a second name for the field. The values always match; branch on either.
What the top-up costs right now (LMC minor units).
The price you agreed to earlier (LMC minor units).
422Validation error; gift_code_nominal_not_allowed, reseller_too_many_codes, idempotency_key_mismatch — the same key with different nominals.
Validation error; gift_code_nominal_not_allowed, reseller_too_many_codes, idempotency_key_mismatch — the same key with different nominals.
{
"message": "string",
"errors": {
"key": [
"string"
]
}
}Errors overview.
errorszorunluA detailed description of each field that failed validation.
object
A detailed description of each field that failed validation.
İlgili içerik
Düz anlatımla
Nesneler
Komşu işlemler
Daha fazla
Bu sayfayı yapay zekâya verin
spesifikasyon 0.0.1