Credit Distribution API
Credit Distributions are used to apply customer credits from a Credit Balance to invoices or for disbursements.
Fetch
GET /billing/{tenantLocator}/creditDistributions/{locator}
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:read
GET /billing/{tenantLocator}/invoices/{locator}/creditDistributions/list
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
includeReversed | query | boolean? | optional |
offset | query | int? | optional |
count | query | int? | optional |
extended | query | boolean? | optional |
Response:CreditDistributionListResponse
Security Group:invoices  Permissions:read,list
GET /billing/{tenantLocator}/creditDistributions/list
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
offset | query | int? | optional |
count | query | int? | optional |
accountLocator | query | string? | optional |
extended | query | boolean? | optional |
Response:CreditDistributionListResponse
Security Group:credit-distributions  Permissions:read,list
CreditDistributionListResponse
¶requiredlistCompleted booleanitems CreditDistributionResponse[]
CreditDistributionResponse
¶requiredlocator stringcurrency stringcreditDistributionState Enum draft | validated | executed | reversed | discardedamount numbercreatedAt datetimecreatedBy uuidshortfallCreditLocators string[]sources CreditItem[]targets CreditItem[]optionalaccountLocator string?executedAt datetime?reversalReason string?reversedAt datetime?validationResult ValidationResult?
Creation and Update
POST /billing/{tenantLocator}/creditDistributions
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
Request:CreditDistributionCreateRequest
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
CreditDistributionCreateRequest
¶requiredamount numbersources CreditItem[]targets CreditItem[]optionalaccountLocator string?currency string?
PATCH /billing/{tenantLocator}/creditDistributions/{locator}
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
Request:CreditDistributionUpdateRequest
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
CreditDistributionUpdateRequest
¶requiredaddSources CreditItem[]addTargets CreditItem[]removeSources string[]removeTargets string[]optionalaccountLocator string?currency string?amount number?
PUT /billing/{tenantLocator}/creditDistributions/{locator}
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
Request:CreditDistributionPutRequest
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
CreditDistributionPutRequest
¶requiredamount numbersources CreditItem[]targets CreditItem[]optionalaccountLocator string?currency string?
Execution
PATCH /billing/{tenantLocator}/creditDistributions/{locator}/validate
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
PATCH /billing/{tenantLocator}/creditDistributions/{locator}/execute
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
Reversal
PATCH /billing/{tenantLocator}/creditDistributions/{locator}/reverse
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
Request:CreditDistributionReverseRequest
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
CreditDistributionReverseRequest
¶requiredreversalType string
Reset and Discard
PATCH /billing/{tenantLocator}/creditDistributions/{locator}/reset
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
PATCH /billing/{tenantLocator}/creditDistributions/{locator}/discard
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
Invoices
GET /billing/{tenantLocator}/creditDistributions/{locator}/invoices/list
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | string | required |
offset | query | int? | optional |
count | query | int? | optional |
extended | query | boolean? | optional |
Response:InvoiceListResponse
Security Group:credit-distributions  Permissions:read,list