Skip to main content
POST
/
split
/
match
Match Splits
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
        }
      ]
    }
  ]
}
/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.
ParameterTypeRequiredDescription
territorystringNoISO 3166-1 alpha-2 country code (e.g., ‘US’, ‘NG’)
dspstringNoDigital Service Provider identifier
usageTypestringNoType of usage
datestringNoDate in ISO 8601 format (e.g., ‘2023-01-15’)
[customDimension]stringNoAny custom dimension key-value pair

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Request Body

Request Schema

FieldTypeRequiredDescription
territorystringISO 3166-1 alpha-2 country code (e.g., ‘US’, ‘NG’)
dspstringDigital Service Provider identifier
usageTypestringType of usage
datestringDate to check for active splits (ISO 8601 format)

Responses

✅ 200 - Success

⚠️ 401 - Unauthorized

⚠️ 404 - Not Found

❌ 500 - Internal Server Error

Tags

Splits

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
territory
string
required

ISO 3166-1 alpha-2 country code (e.g., 'US', 'NG')

Example:

"NG"

dsp
string

Digital Service Provider identifier

Example:

"spotify"

usageType
string

Type of usage

Example:

"stream"

date
string<date>

Date to check for active splits (ISO 8601 format)

Example:

"2023-06-01"

Response

Success

count
integer

Number of matching splits found

splits
object[]

Array of matching splits

I