Skip to main content

create-billing-transfer-end-customer-mappings

dci create-billing-transfer-end-customer-mappings

Maps end-customer AWS accounts under a reseller's PMA to their DoiT tenant, as part of AWS billing transfer onboarding. Reseller-only; distributors are explicitly denied (403).

Unlike POST /billingtransfer/v1/resellerhandshakes, this endpoint has no Idempotency-Key requirement and no dryRun support.

This path is a deliberate exception to the de-hyphenation convention used by the sibling resellerhandshakes and programmanagementaccounts paths — it stays hyphenated to match the existing Go route and its console-facing equivalent.

Each item in the batch is processed independently; per-item outcomes are returned in results[] with HTTP 200. Malformed items are rejected up front and reported in invalidItems without processing any of the batch.

Request

Content-Type: application/json

Schema

{
"type": "object",
"additionalProperties": false,
"required": [
"dpmaId",
"resellerPmaAccountId",
"items"
],
"properties": {
"dpmaId": {
"type": "string"
},
"resellerPmaAccountId": {
"type": "string",
"description": "12-digit AWS account ID of the reseller's program management account.",
"example": "123456789012"
},
"items": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"description": "Batch items. Duplicate `ecAccountId` or `ecCustomerId` values within the batch are rejected.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"ecAccountId",
"ecCustomerId"
],
"properties": {
"ecAccountId": {
"type": "string",
"description": "12-digit AWS account ID of the end-customer account being mapped.",
"example": "123456789012"
},
"ecCustomerId": {
"type": "string",
"description": "DoiT customer ID to map the end-customer account to."
},
"curBasePath": {
"type": "string",
"description": "Optional CUR export base path for the end-customer account."
}
}
}
}
}
}

Output

OK - Batch processed; see results for per-item outcomes and invalidItems for any items rejected before processing.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

FieldTypeDescription
dpmaIdstring
resellerPmaAccountIdstring
resultsarray of object
results[].ecAccountIdstring
results[].ecCustomerIdstring
results[].curBasePathstring
results[].statusstringOne of: "mapped", "already_mapped", "remapped".
invalidItemsarray of objectItems rejected before processing. Omitted when every item passed validation.
invalidItems[].indexintegerZero-based position of the invalid item within the submitted batch.
invalidItems[].resellerCustomerIdstringPresent when the invalid item is a reseller-handshake batch item.
invalidItems[].codestringStable machine-readable error code (e.g. duplicate_pma, duplicate_ec_account).
invalidItems[].reasonstringHuman-readable explanation of why the item is invalid.
Raw JSON schema
{
"type": "object",
"additionalProperties": false,
"required": [
"dpmaId",
"resellerPmaAccountId",
"results"
],
"properties": {
"dpmaId": {
"type": "string"
},
"resellerPmaAccountId": {
"type": "string"
},
"results": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"ecAccountId",
"ecCustomerId",
"status"
],
"properties": {
"ecAccountId": {
"type": "string"
},
"ecCustomerId": {
"type": "string"
},
"curBasePath": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"mapped",
"already_mapped",
"remapped"
]
}
}
}
},
"invalidItems": {
"type": "array",
"description": "Items rejected before processing. Omitted when every item passed validation.",
"items": {
"type": "object",
"description": "A single batch item that failed validation before processing began.",
"additionalProperties": false,
"required": [
"index",
"code"
],
"properties": {
"index": {
"type": "integer",
"description": "Zero-based position of the invalid item within the submitted batch."
},
"resellerCustomerId": {
"type": "string",
"description": "Present when the invalid item is a reseller-handshake batch item."
},
"code": {
"type": "string",
"description": "Stable machine-readable error code (e.g. `duplicate_pma`, `duplicate_ec_account`).",
"example": "duplicate_pma"
},
"reason": {
"type": "string",
"description": "Human-readable explanation of why the item is invalid."
}
}
}
}
}
}

Errors

On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.

HTTP statusExit codeError codeMeaning
400, 42230VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: createbillingtransferendcustomermappings