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 | locator | 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 | locator | 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 | locator? | optional |
extended | query | boolean? | optional |
Response:CreditDistributionListResponse
Security Group:credit-distributions  Permissions:read,list
CreditDistributionListResponse
¶requiredlistCompleted booleanitems CreditDistributionResponse[]
CreditDistributionResponse
¶requiredlocator locatorcurrency stringcreditDistributionState Enum draft | validated | executed | reversed | discardedamount numbercreatedAt datetimecreatedBy uuidshortfallCreditLocators locator[]sources CreditItem[]targets CreditItem[]optionalaccountLocator locator?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 locator?currency string?
PATCH /billing/{tenantLocator}/creditDistributions/{locator}
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | locator | required |
Request:CreditDistributionUpdateRequest
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
CreditDistributionUpdateRequest
¶requiredaddSources CreditItem[]addTargets CreditItem[]removeSources locator[]removeTargets locator[]optionalaccountLocator locator?currency string?amount number?
PUT /billing/{tenantLocator}/creditDistributions/{locator}
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | locator | required |
Request:CreditDistributionPutRequest
Response:CreditDistributionResponse
Security Group:credit-distributions  Permission:write
CreditDistributionPutRequest
¶requiredamount numbersources CreditItem[]targets CreditItem[]optionalaccountLocator locator?currency string?
Execution
PATCH /billing/{tenantLocator}/creditDistributions/{locator}/validate
Request Parameters:
Name | Position | Type | Required |
---|---|---|---|
tenantLocator | path | uuid | required |
locator | path | locator | 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 | locator | 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 | locator | 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 | locator | 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 | locator | 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 | locator | required |
offset | query | int? | optional |
count | query | int? | optional |
extended | query | boolean? | optional |
Response:InvoiceListResponse
Security Group:credit-distributions  Permissions:read,list