/split/match
Description:
The /split/match
endpoint finds splits that match the specified criteria. It allows filtering splits by territory, DSP, usage type, and date.
Method:
POST
Request Body:
The request body should be a JSON object with any of the following properties. At least one property must be provided.
Parameter | Type | Required | Description |
---|---|---|---|
territory | string | No | ISO 3166-1 alpha-2 country code (e.g., āUSā, āNGā) |
dsp | string | No | Digital Service Provider identifier |
usageType | string | No | Type of usage |
date | string | No | Date in ISO 8601 format (e.g., ā2023-01-15ā) |
[customDimension] | string | No | Any custom dimension key-value pair |
curl --request POST \
--url https://server26-dot-royalti-project.uc.r.appspot.com/split/match \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"territory": "NG",
"dsp": "spotify",
"date": "2023-06-01"
}'
{
"count": 1,
"splits": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Nigerian Split",
"type": "Publishing",
"startDate": "2023-01-01T00:00:00.000Z",
"endDate": "2023-12-31T23:59:59.999Z",
"conditions": [
{
"mode": "include",
"territories": [
"NG",
"GH",
"KE"
],
"dsps": [
"spotify",
"apple"
]
}
],
"shares": [
{
"user": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com"
},
"share": 60
}
]
}
]
}
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Success
The response is of type object
.
curl --request POST \
--url https://server26-dot-royalti-project.uc.r.appspot.com/split/match \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"territory": "NG",
"dsp": "spotify",
"date": "2023-06-01"
}'
{
"count": 1,
"splits": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Nigerian Split",
"type": "Publishing",
"startDate": "2023-01-01T00:00:00.000Z",
"endDate": "2023-12-31T23:59:59.999Z",
"conditions": [
{
"mode": "include",
"territories": [
"NG",
"GH",
"KE"
],
"dsps": [
"spotify",
"apple"
]
}
],
"shares": [
{
"user": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com"
},
"share": 60
}
]
}
]
}