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."
}
}
}
}
}
}

Responses

200 (application/json)

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

{
"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."
}
}
}
}
}
}

400 (application/json)

Bad Request - The server cannot process the request, often due to a malformed request.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

401 (application/json)

Unauthorized - Invalid API key.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

403 (application/json)

Forbidden - The caller is a distributor (denied), does not own the referenced resellerPmaAccountId, or the reseller is not mapped to the referenced dpmaId.

{
"type": "object",
"description": "RFC 7807 problem-detail body returned by Billing Transfer endpoints for 4xx/5xx errors.",
"additionalProperties": false,
"required": [
"type",
"title",
"status",
"code"
],
"properties": {
"type": {
"type": "string",
"format": "uri",
"description": "A URI identifying the problem type."
},
"title": {
"type": "string",
"description": "Short, human-readable summary of the problem type."
},
"status": {
"type": "integer",
"description": "The HTTP status code repeated in the body."
},
"detail": {
"type": "string",
"description": "Human-readable explanation specific to this occurrence of the problem."
},
"code": {
"type": "string",
"description": "Stable machine-readable error code.",
"example": "billing-transfer.batch_validation_failed"
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same request may succeed without changes."
},
"invalidItems": {
"type": "array",
"description": "Present on batch-validation failures; the batch items that failed 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."
}
}
}
}
}
}

422 (application/json)

Unprocessable Entity - One or more items in the batch failed validation before any processing began (missing required fields, or duplicate account/customer IDs within the batch), or a batch-level field such as dpmaId is missing or invalid. None of the batch was processed; resubmit with corrected items. Invalid items are listed in invalidItems.

{
"type": "object",
"description": "RFC 7807 problem-detail body returned by Billing Transfer endpoints for 4xx/5xx errors.",
"additionalProperties": false,
"required": [
"type",
"title",
"status",
"code"
],
"properties": {
"type": {
"type": "string",
"format": "uri",
"description": "A URI identifying the problem type."
},
"title": {
"type": "string",
"description": "Short, human-readable summary of the problem type."
},
"status": {
"type": "integer",
"description": "The HTTP status code repeated in the body."
},
"detail": {
"type": "string",
"description": "Human-readable explanation specific to this occurrence of the problem."
},
"code": {
"type": "string",
"description": "Stable machine-readable error code.",
"example": "billing-transfer.batch_validation_failed"
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same request may succeed without changes."
},
"invalidItems": {
"type": "array",
"description": "Present on batch-validation failures; the batch items that failed 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."
}
}
}
}
}
}

500 (application/json)

Internal Server Error - Something went wrong with the DoiT API server.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

Aliases: createbillingtransferendcustomermappings