Appearance
pbx-supplier-cdr
2 endpoints.
POST /api/v1/pbx-supplier-cdr/upload
Upload Supplier Cdr
Upload a supplier CDR export, store its chargeable lines, and start the comparison against our own call records.
Responds as soon as the file is stored — status is pending and the comparison follows in the background. Parse failures are refused up front (400) so a file that isn't a CDR export never becomes an empty batch the operator has to work out how to interpret.
200 — Successful Response
json
{
"additionalProperties": true,
"type": "object",
"title": "Response Upload Supplier Cdr Api V1 Pbx Supplier Cdr Upload Post"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/pbx-supplier-cdr/{batch_id}/compare
Recompare
Re-run the comparison for a batch already uploaded.
Worth doing when the tolerances were wrong, or when the PBX box has since re-rated or back-filled calls in the period — the stored supplier lines are re-matched against whatever call_history says now.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
batch_id | path | yes | integer |
200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Recompare Api V1 Pbx Supplier Cdr Batch Id Compare Post"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}