AlphaCount Developers
API referenceRevenue share

Attribute a customer to an agreement

PUT
/commission-attributions/by-ref/{source}/{external_ref}

This customer came from that agreement's partner. Attributions made through the API are active at once. Scope partner:commissions:write.

Authorization

apiKey partner:commissions:write
headerAuthorizationBearer <ab_…>

An API key from Integrations → Connect AI assistants (MCP) → New access, bound to exactly one company. Each operation names the scope the key must carry.

Scope: partner:commissions:write

Path Parameters

source*Source
Match^[a-z0-9][a-z0-9_-]{0,49}$
external_ref*External Ref
Match^[A-Za-z0-9][A-Za-z0-9._:@+-]{0,254}$

Header Parameters

AlphaCount-Version?string

The API version to use. Default: the current one.

Request Body

application/json
  1. body

PUT /commission-attributions/by-ref/{source}/{ref}.

agreement_ref*Agreement Ref
Match^[A-Za-z0-9][A-Za-z0-9._:@+-]{0,254}$
customer*
end_date?|null
start_date*Start Date
Formatdate

Response Body

OK

application/json
  1. response
agreement_id*Agreement Id
agreement_name*string|null
confirmed_at*|null
conflicts_with_id*string|null
customer_id*Customer Id
customer_name*string|null
end_date*|null
external_ref*string|null
id*Id
partner_id*string|null
partner_name*string|null
source*Source
source_ref*string|null
start_date*Start Date
Formatdate
status*Status
Value in"proposed""active""ended""rejected"
Example Request
curl -X PUT 'https://app.alphacount.ai/api/partner/v1/commission-attributions/by-ref/string/string' \  -H 'Authorization: Bearer ab_...' \  -H 'Content-Type: application/json' \  -d '{  "agreement_ref": "lernlink-2026",  "customer": {    "external_ref": "org-1",    "source": "alphalearn"  },  "start_date": "2026-10-01"}'
Example Response
{  "agreement_id": "00000000-0000-4000-8000-000000000002",  "agreement_name": "lern.link GmbH",  "confirmed_at": "2026-10-19T15:09:58.234062",  "conflicts_with_id": null,  "customer_id": "00000000-0000-4000-8000-000000000004",  "customer_name": "Musterschule",  "end_date": null,  "external_ref": "org-1-lernlink",  "id": "00000000-0000-4000-8000-000000000001",  "partner_id": "00000000-0000-4000-8000-000000000003",  "partner_name": "lern.link GmbH",  "source": "api",  "source_ref": "alphalearn:org-1-lernlink",  "start_date": "2026-10-01",  "status": "active"}