Parties and credits
A party is a person or organization: an artist, a label, a
producer, a publisher. A credit connects a party to a release or a
track in a DDEX role — MainArtist, Producer, Composer.
Release-level credits (the billing artist, the label) and track-level credits (who played and produced each recording) are kept separate, because they genuinely differ — on a compilation, especially.
Labels also appear as Label on each release, and labels lists every label in your catalog.
- querylabels
- mutationcreateParty
- mutationcreditRelease
- mutationcreditResource
- mutationremoveReleaseCredit
- mutationremoveResourceCredit
The Party object#
A person or organization — an artist, label, producer, writer or publisher.
Attributes
partyPkInt!Unique identifier. The same party credited on two releases has the samepartyPk.- DDEX Party Identifier, when supplied. Many individual performers have none.
- One name, preferring the one the sender marked default. When a party has names in several scripts and none is marked default, which one you get is arbitrary — use
nameswhenever the script matters. names[LocalizedText!]!Every name this party carries, in every language, script and territory.Arguments
typeStringOnly variants of this text type, e.g.DisplayTitleorFormalTitle. Case-insensitive.languageStringOnly variants whose language tag is exactly this, e.g.ja-Jpanorja-Latn. The whole tag, not a prefix:jadoes not matchja-Jpan. Usescriptto select by script alone.scriptStringOnly variants in this ISO 15924 script, e.g.JpanorLatn.territoryStringOnly variants that apply in this territory, e.g.US: variants scoped to it, plus unqualified variants where nothing more specific exists. See Territories and languages.isDefaultBooleanOnly variants whose default flag matches. Many senders flag none as default, sotruecan legitimately return an empty list.
{ "partyPk": 90450, "dpid": null, "name": "Halfway Ghosts" }The Credit object#
One party credited in one role.
Attributes
partyParty!The credited party.- The DDEX role exactly as delivered —
MainArtist,StudioProducer,Composer, … - Which vocabulary the role came from:
DisplayArtistRolefor billing,ResourceContributorRolefor people who worked on the recording. Filter on this rather than guessing from the role's spelling. - The territory the credit applies to.
nullmeans unqualified, which is not the same asWorldwide. - Billing order, when the sender gave one.
{
"party": { "partyPk": 90450, "name": "Halfway Ghosts" },
"role": "MainArtist",
"roleKind": "DisplayArtistRole",
"territory": null,
"sequence": 1
}The Label object#
A label a release came out on. A label is a Party, so every release on the same label shares its partyPk.
Attributes
partyPkInt!The label's party id — the same on every release on this label.- The label's default name.
- DDEX Party Identifier, when the sender supplied one.
DisplayLabelorUserDefinedwhen the sender said; usuallynull.- The territory this label applies to.
nullmeans unqualified, notWorldwide. isDefaultBoolean!Whether the sender marked this label as the default.- The order the message listed labels in.
{
"partyPk": 90211,
"name": "Lanternfish Records",
"dpid": "PADPIDA2014120301H",
"labelType": null,
"territory": null,
"isDefault": true,
"sequence": 1
}The DraftParty object#
A party as returned by createParty.
Attributes
partyPkInt!Unique identifier. Use it in CreditInput.nameString!The name, trimmed.- The DPID, if given.
The CreditInput input object#
A credit to add.
Fields
- The party to credit, from createParty or an existing credit.
- The DDEX role, e.g.
MainArtist,Producer,Composer. NotLabel— a label is set withlabelson createRelease or updateRelease, and aLabelcredit is refused. - The vocabulary
rolebelongs to.DisplayArtistRolefor release billing;ResourceContributorRolefor track contributors. territoryStringLeave unset unless the credit really applies to one territory only. Unset is not the same asWorldwide.sequenceIntBilling order.
The LabelInput input object#
A label to put a release out on, in labels.
Fields
- The label, from createParty. The same party on every release keeps them together under one label.
labelTypeStringDisplayLabelorUserDefined. Usually left out.territoryStringLeave unset unless the label applies to one territory only — a reissue can carry a different label per territory. Unset is not the same asWorldwide.sequenceIntDisplay order when there are several.- The default among several. At most one; when none is marked, the first is.
List labels#
Every label in your catalog with how many releases it has, busiest first. Drafts and blocked deliveries are not counted.
Arguments
- Maximum number of labels to return. Clamped to 1–1000.
Returns
A list of LabelSummary objects.
query {
labels(limit: 3) {
partyPk
name
releases
}
}curl https://api.schema.fm/graphql \
-H "Authorization: Bearer $SCHEMA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'EOF'
{
"query": "query {\n labels(limit: 3) {\n partyPk\n name\n releases\n }\n}"
}
EOFconst res = await fetch("https://api.schema.fm/graphql", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCHEMA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: `
query {
labels(limit: 3) {
partyPk
name
releases
}
}
`,
}),
});
const { data, errors } = await res.json();{
"data": {
"labels": [
{ "partyPk": 90211, "name": "Lanternfish Records", "releases": 42 },
{ "partyPk": 90377, "name": "Coastline Sound", "releases": 17 },
{ "partyPk": 91002, "name": "Halcyon Audio", "releases": 5 }
]
}
}Create a party#
Create an artist, label, producer or writer in your catalog, to credit with creditRelease or creditResource.
Parties are matched by DPID, not by name: passing a DPID that
already exists returns the existing party, while creating two parties
with the same name and no DPID makes two parties. Reuse the returned
partyPk to credit the same party again.
Arguments
- The party to create.
Returns
A DraftParty.
mutation {
createParty(input: { name: "Halfway Ghosts" }) {
partyPk
name
}
}curl https://api.schema.fm/graphql \
-H "Authorization: Bearer $SCHEMA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'EOF'
{
"query": "mutation {\n createParty(input: { name: \"Halfway Ghosts\" }) {\n partyPk\n name\n }\n}"
}
EOFconst res = await fetch("https://api.schema.fm/graphql", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCHEMA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: `
mutation {
createParty(input: { name: "Halfway Ghosts" }) {
partyPk
name
}
}
`,
}),
});
const { data, errors } = await res.json();{
"data": {
"createParty": {
"partyPk": 90450,
"name": "Halfway Ghosts"
}
}
}Credit a release#
Credit a party on a release as a whole — the display artist, the label, anyone credited at album level. Crediting the same party in the same role twice has no further effect.
Arguments
- The release to credit.
- Who, and in what role.
Show child parameters
- The party to credit, from createParty or an existing credit.
- The DDEX role, e.g.
MainArtist,Producer,Composer. NotLabel— a label is set withlabelson createRelease or updateRelease, and aLabelcredit is refused. - The vocabulary
rolebelongs to.DisplayArtistRolefor release billing;ResourceContributorRolefor track contributors. territoryStringLeave unset unless the credit really applies to one territory only. Unset is not the same asWorldwide.sequenceIntBilling order.
Returns
The Release.
mutation {
creditRelease(
releasePk: 48290
input: { partyPk: 90450, role: "MainArtist" }
) {
contributors { party { name } role }
}
}curl https://api.schema.fm/graphql \
-H "Authorization: Bearer $SCHEMA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'EOF'
{
"query": "mutation {\n creditRelease(\n releasePk: 48290\n input: { partyPk: 90450, role: \"MainArtist\" }\n ) {\n contributors { party { name } role }\n }\n}"
}
EOFconst res = await fetch("https://api.schema.fm/graphql", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCHEMA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: `
mutation {
creditRelease(
releasePk: 48290
input: { partyPk: 90450, role: "MainArtist" }
) {
contributors { party { name } role }
}
}
`,
}),
});
const { data, errors } = await res.json();{
"data": {
"creditRelease": {
"contributors": [
{ "party": { "name": "Halfway Ghosts" }, "role": "MainArtist" }
]
}
}
}Credit a resource#
Credit a party on one track — a performer, producer, engineer or
writer. Use roleKind: "ResourceContributorRole" for the people who
worked on the recording.
Arguments
- The resource to credit.
- Who, and in what role.
Show child parameters
- The party to credit, from createParty or an existing credit.
- The DDEX role, e.g.
MainArtist,Producer,Composer. NotLabel— a label is set withlabelson createRelease or updateRelease, and aLabelcredit is refused. - The vocabulary
rolebelongs to.DisplayArtistRolefor release billing;ResourceContributorRolefor track contributors. territoryStringLeave unset unless the credit really applies to one territory only. Unset is not the same asWorldwide.sequenceIntBilling order.
Returns
A DraftResource with the resource's current state.
mutation {
creditResource(
resourcePk: 771340
input: { partyPk: 90460, role: "Producer", roleKind: "ResourceContributorRole" }
) {
resourcePk
state
}
}curl https://api.schema.fm/graphql \
-H "Authorization: Bearer $SCHEMA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'EOF'
{
"query": "mutation {\n creditResource(\n resourcePk: 771340\n input: { partyPk: 90460, role: \"Producer\", roleKind: \"ResourceContributorRole\" }\n ) {\n resourcePk\n state\n }\n}"
}
EOFconst res = await fetch("https://api.schema.fm/graphql", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCHEMA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: `
mutation {
creditResource(
resourcePk: 771340
input: { partyPk: 90460, role: "Producer", roleKind: "ResourceContributorRole" }
) {
resourcePk
state
}
}
`,
}),
});
const { data, errors } = await res.json();{
"data": {
"creditResource": {
"resourcePk": 771340,
"state": "stored"
}
}
}Remove a release credit#
Withdraw one release-level credit. The party itself is not deleted — it may be credited elsewhere.
Arguments
- The release.
- The credited party.
- The role to withdraw, e.g.
MainArtist. - The vocabulary the role belongs to.
Returns
true if a credit was removed.
mutation {
removeReleaseCredit(releasePk: 48290, partyPk: 90450, role: "FeaturedArtist")
}curl https://api.schema.fm/graphql \
-H "Authorization: Bearer $SCHEMA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'EOF'
{
"query": "mutation {\n removeReleaseCredit(releasePk: 48290, partyPk: 90450, role: \"FeaturedArtist\")\n}"
}
EOFconst res = await fetch("https://api.schema.fm/graphql", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCHEMA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: `
mutation {
removeReleaseCredit(releasePk: 48290, partyPk: 90450, role: "FeaturedArtist")
}
`,
}),
});
const { data, errors } = await res.json();{
"data": {
"removeReleaseCredit": true
}
}Remove a resource credit#
Withdraw one track-level credit. The party survives.
Arguments
- The resource.
- The credited party.
- The role to withdraw, e.g.
Producer. - The vocabulary the role belongs to.
Returns
true if a credit was removed.
mutation {
removeResourceCredit(resourcePk: 771340, partyPk: 90460, role: "Producer")
}curl https://api.schema.fm/graphql \
-H "Authorization: Bearer $SCHEMA_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'EOF'
{
"query": "mutation {\n removeResourceCredit(resourcePk: 771340, partyPk: 90460, role: \"Producer\")\n}"
}
EOFconst res = await fetch("https://api.schema.fm/graphql", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCHEMA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: `
mutation {
removeResourceCredit(resourcePk: 771340, partyPk: 90460, role: "Producer")
}
`,
}),
});
const { data, errors } = await res.json();{
"data": {
"removeResourceCredit": true
}
}