Ostorya dev docs

Admin API/Common objects/Mutations

externalAccountClaim

mutationOstorya extension

Links a Facebook ad account or WhatsApp number to this store's Ostorya account before the app saves it (one Ostorya account per business).

Returns ExternalAccountClaimPayload!

mutation ExternalAccountClaim($externalId: String!, $kind: ExternalAccountKind!) {
  externalAccountClaim(externalId: $externalId, kind: $kind) {
    status
    balance
    owedCredits
    userErrors {
      code
      message
      field
    }
  }
}

# Variables
{
  "externalId": "",
  "kind": "META_AD_ACCOUNT"
}

Arguments

externalIdString!required
labelString
payOldDebtBoolean

Payload

balanceInt
This store's credits balance (NOT_ENOUGH_CREDITS: what it has).
owedCreditsInt
OLD_ACCOUNT_DEBT / NOT_ENOUGH_CREDITS: what the other Ostorya account owes.
statusString
LINKED (new or already this account's), MOVED (taken from another Ostorya account, which is now suspended), or null when refused.
userErrors[UserError!]!required