Track¶
A track is an individual recording within a product. Create as many tracks as the product contains. Each track belongs to a product and declares its audio language.
Lists Tracks¶
GET https://domain.com/api/v1/tracks
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Response — 200 OK
{
"data": [
{
"type": "tracks",
"id": "<ID>",
"attributes": {
"title": "Track title",
"subtitle": null,
"track-number": 1,
"volume-number": 1,
"isrc-code": "ESA112310001",
"length": 0,
"production-line": null,
"clean": false,
"parental-advisory": false,
"production-date": null,
"preview-start": 30,
"preview-end": null,
"lyrics": null,
"explicit-content": null,
"artist": ["Artist"],
"author": null,
"composer": null,
"publisher": null,
"contributor": null,
"remixer": null,
"featuring": null,
"performer": null,
"producer": null,
"orchestra": null,
"lyricist": null,
"arranger": null,
"director": null,
"audio16bits": false,
"audio24bits": true,
"createdAt": "2023-08-11T20:45:15.000000Z",
"updatedAt": "2023-08-11T20:45:23.000000Z"
},
"relationships": {
"product": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/product",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/product"
}
},
"audio-language": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/audio-language",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/audio-language"
}
},
"records": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/records",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/records"
}
}
},
"links": {
"self": "https://domain.com/api/v1/tracks/<ID>"
}
}
],
"meta": {
"page": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 20,
"to": 1,
"total": 1
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "https://domain.com/api/v1/tracks?page[number]=1&page[size]=20",
"last": "https://domain.com/api/v1/tracks?page[number]=1&page[size]=20"
}
}
Filters¶
| Filter | Example |
|---|---|
| Title | /tracks?filter[title]=Track title |
| ISRC | /tracks?filter[isrc-code]=ESA112310001 |
| ID | /tracks?filter[id]=1 |
| Track number | /tracks?filter[track-number]=1 |
| Product ID | /tracks?filter[product-id]=1 |
Get Track¶
GET https://domain.com/api/v1/tracks/:id
Path Parameters¶
| Name | Type | Description |
|---|---|---|
| id* | Number | Track ID |
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Response — 200 OK
{
"data": {
"type": "tracks",
"id": "<ID>",
"attributes": {
"title": "Track title",
"subtitle": null,
"track-number": 1,
"volume-number": 1,
"isrc-code": "ESA112314511",
"length": 0,
"production-line": null,
"clean": false,
"parental-advisory": false,
"production-date": null,
"preview-start": 30,
"preview-end": null,
"lyrics": null,
"explicit-content": null,
"artist": ["Artist"],
"author": null,
"composer": null,
"publisher": null,
"contributor": null,
"remixer": null,
"featuring": null,
"performer": null,
"producer": null,
"orchestra": null,
"lyricist": null,
"arranger": null,
"director": null,
"audio16bits": false,
"audio24bits": true,
"createdAt": "2023-08-11T20:45:15.000000Z",
"updatedAt": "2023-08-11T20:45:23.000000Z"
},
"relationships": {
"product": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/product",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/product"
}
},
"audio-language": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/audio-language",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/audio-language"
}
},
"records": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/records",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/records"
}
}
},
"links": {
"self": "https://domain.com/api/v1/tracks/<ID>"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://domain.com/api/v1/tracks/<ID>"
}
}
Create Track¶
POST https://domain.com/api/v1/tracks
The isrc-code must pass ISRC checksum validation. The label relationship is set automatically from the track's product and cannot be set by the client.
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Request Body¶
| Name | Type | Required | Description |
|---|---|---|---|
| title | String | Yes | Track title |
| track-number | Number | Yes | Track number |
| volume-number | Number | Yes | Volume number |
| isrc-code | String | Yes | ISRC code |
| artist | Array | Yes | e.g. ["Artist name"] |
| product | Object | Yes | Product resource (relationship) |
| audio-language | Object | Yes | Language resource (relationship) |
| subtitle | String | No | Track subtitle |
| composer | Array | No | e.g. ["Composer name"] |
| publisher | Array | No | e.g. ["Publisher name"] |
| featuring | Array | No | e.g. ["Featured name"] |
| remixer | Array | No | e.g. ["Remixer name"] |
| producer | Array | No | e.g. ["Producer name"] |
| author | Array | No | e.g. ["Author name"] |
| lyricist | Array | No | e.g. ["Lyricist name"] |
| arranger | Array | No | e.g. ["Arranger name"] |
| director | Array | No | e.g. ["Director name"] |
| lyrics | String | No | Track lyrics |
| parental-advisory | Boolean | No | false |
| clean | Boolean | No | Whether this is a clean version |
| preview-start | Number | No | e.g. 30 |
| preview-end | Number | No | Preview end in seconds |
| production-date | String | No | date, e.g. 2023-08-14 |
| production-line | String | No | e.g. 2023 Records Music |
| explicit-content | Boolean | No | Whether the track contains explicit content |
Response — 201 Created
{
"data": {
"type": "tracks",
"id": "<ID>",
"attributes": {
"title": "Track title",
"subtitle": null,
"track-number": 1,
"volume-number": 1,
"isrc-code": "ESA112314511",
"length": 0,
"production-line": null,
"clean": false,
"parental-advisory": false,
"production-date": null,
"preview-start": 30,
"preview-end": null,
"lyrics": null,
"explicit-content": null,
"artist": ["Artist"],
"author": null,
"composer": null,
"publisher": null,
"contributor": null,
"remixer": null,
"featuring": null,
"performer": null,
"producer": null,
"orchestra": null,
"lyricist": null,
"arranger": null,
"director": null,
"audio16bits": false,
"audio24bits": true,
"createdAt": "2023-08-11T20:45:15.000000Z",
"updatedAt": "2023-08-11T20:45:23.000000Z"
},
"relationships": {
"product": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/product",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/product"
}
},
"audio-language": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/audio-language",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/audio-language"
}
},
"records": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/records",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/records"
}
}
},
"links": {
"self": "https://domain.com/api/v1/tracks/<ID>"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://domain.com/api/v1/tracks/<ID>"
}
}
Response — 422 Unprocessable Entity
{
"jsonapi": {
"version": "1.0"
},
"errors": [
{
"detail": "The title field is required.",
"source": {
"pointer": "/data/attributes/title"
},
"status": "422",
"title": "Unprocessable Entity"
},
{
"detail": "ISRC code is not valid",
"status": "422",
"title": "Unprocessable Entity"
}
]
}
Update Track¶
PATCH https://domain.com/api/v1/tracks/:id
Accepts the same writable attributes as Create (all optional on update).
Path Parameters¶
| Name | Type | Description |
|---|---|---|
| id* | Number | Track ID |
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Request Body¶
| Name | Type | Required | Description |
|---|---|---|---|
| title | String | No | Track title |
| isrc-code | String | No | ISRC code |
| track-number | Number | No | Track number |
| lyrics | String | No | Track lyrics |
Response — 200 OK
{
"data": {
"type": "tracks",
"id": "<ID>",
"attributes": {
"title": "Track title",
"subtitle": null,
"track-number": 1,
"volume-number": 1,
"isrc-code": "ESA112314511",
"length": 0,
"production-line": null,
"clean": false,
"parental-advisory": false,
"production-date": null,
"preview-start": 30,
"preview-end": null,
"lyrics": null,
"explicit-content": null,
"artist": ["Artist"],
"author": null,
"composer": null,
"publisher": null,
"contributor": null,
"remixer": null,
"featuring": null,
"performer": null,
"producer": null,
"orchestra": null,
"lyricist": null,
"arranger": null,
"director": null,
"audio16bits": false,
"audio24bits": true,
"createdAt": "2023-08-11T20:45:15.000000Z",
"updatedAt": "2023-08-11T20:45:23.000000Z"
},
"relationships": {
"product": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/product",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/product"
}
},
"audio-language": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/audio-language",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/audio-language"
}
},
"records": {
"links": {
"related": "https://domain.com/api/v1/tracks/<ID>/records",
"self": "https://domain.com/api/v1/tracks/<ID>/relationships/records"
}
}
},
"links": {
"self": "https://domain.com/api/v1/tracks/<ID>"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://domain.com/api/v1/tracks/<ID>"
}
}
Delete Track¶
DELETE https://domain.com/api/v1/tracks/:id
Path Parameters¶
| Name | Type | Description |
|---|---|---|
| id* | Number | Track ID |
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Response — 204 No Content (delete OK, empty body)
Response — 404 Not Found