curl --request POST \
--url https://api.decodahealth.com/inventory/commission-structures/generate-report \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"structure_ids": [
"<string>"
],
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"timezone": "<string>"
}
'[
{
"commissionStructure": {
"name": "<string>",
"id": "<string>",
"description": "<string>",
"commissions": [
{
"commissionStructureId": "<string>",
"id": "<string>",
"itemId": "<string>",
"itemCategory": "<string>",
"itemIsPhysical": true,
"totalSalesAmount": 123,
"percentage": 123,
"amount": 123,
"deductCost": false,
"isArchived": false,
"updatedDate": "2023-11-07T05:31:56Z",
"createdDate": "2023-11-07T05:31:56Z",
"item": {
"name": "<string>",
"price": 123,
"id": "<string>",
"brandName": "<string>",
"description": "<string>",
"category": "<string>",
"unit": "AMPOULES",
"isPhysical": true,
"isArchived": false,
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"type": "PRODUCT",
"externalId": "<string>",
"exemptedTaxIds": [
"<string>"
]
}
}
],
"providers": [
{
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"createdDate": "2023-11-07T05:31:56Z"
}
]
},
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"payouts": [
{
"commissionReportId": "<string>",
"commissionId": "<string>",
"providerId": "<string>",
"amount": 123,
"provider": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"createdDate": "2023-11-07T05:31:56Z"
},
"commission": {
"commissionStructureId": "<string>",
"id": "<string>",
"itemId": "<string>",
"itemCategory": "<string>",
"itemIsPhysical": true,
"totalSalesAmount": 123,
"percentage": 123,
"amount": 123,
"deductCost": false,
"isArchived": false,
"updatedDate": "2023-11-07T05:31:56Z",
"createdDate": "2023-11-07T05:31:56Z",
"item": {
"name": "<string>",
"price": 123,
"id": "<string>",
"brandName": "<string>",
"description": "<string>",
"category": "<string>",
"unit": "AMPOULES",
"isPhysical": true,
"isArchived": false,
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"type": "PRODUCT",
"externalId": "<string>",
"exemptedTaxIds": [
"<string>"
]
}
},
"chargeItems": [
{
"quantity": 123,
"price": 123,
"id": "<string>",
"itemId": "<string>",
"chargeId": "<string>",
"name": "<string>",
"description": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"discountReason": "<string>",
"soldPackageId": "<string>",
"bankedQuantity": 123,
"bankedItemId": "<string>",
"issuedDiscountId": "<string>",
"soldByProviderId": "<string>",
"taxAmount": 123,
"pricingId": "<string>",
"shipmentIds": [
"<string>"
],
"item": {
"name": "<string>",
"price": 123,
"id": "<string>",
"brandName": "<string>",
"description": "<string>",
"category": "<string>",
"unit": "AMPOULES",
"isPhysical": true,
"isArchived": false,
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"type": "PRODUCT",
"externalId": "<string>",
"exemptedTaxIds": [
"<string>"
]
},
"locationId": "<string>",
"locationName": "<string>",
"saleDate": "2023-11-07T05:31:56Z"
}
],
"events": [
{
"id": "<string>",
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"type": "APPOINTMENT",
"status": "PENDING",
"location": {
"id": "<string>",
"isVirtual": true
},
"attendees": [],
"recurringEventId": "<string>",
"recurringEvent": {
"id": "<string>",
"rrule": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"timezone": "<string>",
"type": "APPOINTMENT",
"title": "<string>",
"organizerId": "<string>",
"serviceIds": [
"<string>"
],
"eventServices": [
{
"serviceId": "<string>",
"providerId": "<string>",
"durationMinutes": 123
}
],
"capacity": 123,
"attendeeIds": [
"<string>"
],
"locationId": "<string>",
"externalId": "<string>"
},
"eventServices": [],
"icons": [],
"capacity": 123,
"quickNotes": [
{
"id": "<string>",
"patientId": "<string>",
"note": "<string>",
"creator": {
"id": "<string>",
"type": "PROVIDER",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
},
"createdDate": "2023-11-07T05:31:56Z",
"eventId": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"isArchived": false
}
],
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"soldPackages": [
{
"packageId": "<string>",
"patientId": "<string>",
"chargeItemId": "<string>",
"status": "USED",
"createdDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"cancellationReason": "<string>",
"package": {
"name": "<string>",
"price": 123,
"id": "<string>",
"description": "<string>",
"isArchived": false,
"externalId": "<string>",
"internalNotes": "<string>",
"items": [
{
"packageId": "<string>",
"itemId": "<string>",
"price": 123,
"id": "<string>",
"quantity": 123,
"item": {
"name": "<string>",
"price": 123,
"id": "<string>",
"brandName": "<string>",
"description": "<string>",
"category": "<string>",
"unit": "AMPOULES",
"isPhysical": true,
"isArchived": false,
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"type": "PRODUCT",
"externalId": "<string>",
"exemptedTaxIds": [
"<string>"
]
}
}
],
"category": "<string>"
},
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z"
}
],
"totalPayout": 123,
"commissionStructureId": "<string>",
"creatorId": "<string>",
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"isArchived": false
}
]Generate commission payouts for one or more structures based on charges in the date range
curl --request POST \
--url https://api.decodahealth.com/inventory/commission-structures/generate-report \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"structure_ids": [
"<string>"
],
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"timezone": "<string>"
}
'[
{
"commissionStructure": {
"name": "<string>",
"id": "<string>",
"description": "<string>",
"commissions": [
{
"commissionStructureId": "<string>",
"id": "<string>",
"itemId": "<string>",
"itemCategory": "<string>",
"itemIsPhysical": true,
"totalSalesAmount": 123,
"percentage": 123,
"amount": 123,
"deductCost": false,
"isArchived": false,
"updatedDate": "2023-11-07T05:31:56Z",
"createdDate": "2023-11-07T05:31:56Z",
"item": {
"name": "<string>",
"price": 123,
"id": "<string>",
"brandName": "<string>",
"description": "<string>",
"category": "<string>",
"unit": "AMPOULES",
"isPhysical": true,
"isArchived": false,
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"type": "PRODUCT",
"externalId": "<string>",
"exemptedTaxIds": [
"<string>"
]
}
}
],
"providers": [
{
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"createdDate": "2023-11-07T05:31:56Z"
}
]
},
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"payouts": [
{
"commissionReportId": "<string>",
"commissionId": "<string>",
"providerId": "<string>",
"amount": 123,
"provider": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"createdDate": "2023-11-07T05:31:56Z"
},
"commission": {
"commissionStructureId": "<string>",
"id": "<string>",
"itemId": "<string>",
"itemCategory": "<string>",
"itemIsPhysical": true,
"totalSalesAmount": 123,
"percentage": 123,
"amount": 123,
"deductCost": false,
"isArchived": false,
"updatedDate": "2023-11-07T05:31:56Z",
"createdDate": "2023-11-07T05:31:56Z",
"item": {
"name": "<string>",
"price": 123,
"id": "<string>",
"brandName": "<string>",
"description": "<string>",
"category": "<string>",
"unit": "AMPOULES",
"isPhysical": true,
"isArchived": false,
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"type": "PRODUCT",
"externalId": "<string>",
"exemptedTaxIds": [
"<string>"
]
}
},
"chargeItems": [
{
"quantity": 123,
"price": 123,
"id": "<string>",
"itemId": "<string>",
"chargeId": "<string>",
"name": "<string>",
"description": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"discountReason": "<string>",
"soldPackageId": "<string>",
"bankedQuantity": 123,
"bankedItemId": "<string>",
"issuedDiscountId": "<string>",
"soldByProviderId": "<string>",
"taxAmount": 123,
"pricingId": "<string>",
"shipmentIds": [
"<string>"
],
"item": {
"name": "<string>",
"price": 123,
"id": "<string>",
"brandName": "<string>",
"description": "<string>",
"category": "<string>",
"unit": "AMPOULES",
"isPhysical": true,
"isArchived": false,
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"type": "PRODUCT",
"externalId": "<string>",
"exemptedTaxIds": [
"<string>"
]
},
"locationId": "<string>",
"locationName": "<string>",
"saleDate": "2023-11-07T05:31:56Z"
}
],
"events": [
{
"id": "<string>",
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"type": "APPOINTMENT",
"status": "PENDING",
"location": {
"id": "<string>",
"isVirtual": true
},
"attendees": [],
"recurringEventId": "<string>",
"recurringEvent": {
"id": "<string>",
"rrule": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"timezone": "<string>",
"type": "APPOINTMENT",
"title": "<string>",
"organizerId": "<string>",
"serviceIds": [
"<string>"
],
"eventServices": [
{
"serviceId": "<string>",
"providerId": "<string>",
"durationMinutes": 123
}
],
"capacity": 123,
"attendeeIds": [
"<string>"
],
"locationId": "<string>",
"externalId": "<string>"
},
"eventServices": [],
"icons": [],
"capacity": 123,
"quickNotes": [
{
"id": "<string>",
"patientId": "<string>",
"note": "<string>",
"creator": {
"id": "<string>",
"type": "PROVIDER",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
},
"createdDate": "2023-11-07T05:31:56Z",
"eventId": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"isArchived": false
}
],
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"soldPackages": [
{
"packageId": "<string>",
"patientId": "<string>",
"chargeItemId": "<string>",
"status": "USED",
"createdDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"cancellationReason": "<string>",
"package": {
"name": "<string>",
"price": 123,
"id": "<string>",
"description": "<string>",
"isArchived": false,
"externalId": "<string>",
"internalNotes": "<string>",
"items": [
{
"packageId": "<string>",
"itemId": "<string>",
"price": 123,
"id": "<string>",
"quantity": 123,
"item": {
"name": "<string>",
"price": 123,
"id": "<string>",
"brandName": "<string>",
"description": "<string>",
"category": "<string>",
"unit": "AMPOULES",
"isPhysical": true,
"isArchived": false,
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"type": "PRODUCT",
"externalId": "<string>",
"exemptedTaxIds": [
"<string>"
]
}
}
],
"category": "<string>"
},
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z"
}
],
"totalPayout": 123,
"commissionStructureId": "<string>",
"creatorId": "<string>",
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"isArchived": false
}
]The tenant you are making this request on behalf of
Your api key
Successful Response
Commission structure this report belongs to
Show child attributes
Start date of the report
End date of the report
Payouts for this commission structure
Show child attributes
Total payout for this commission structure
Commission structure this report belongs to
Creator of the report
Unique identifier for the commission report
When the report was created
When the report was last updated
Whether the report is archived