POST/v1/customers/{external_id}/purchase-transfers
Transfer a purchase to a customer
Moves an App Store purchase from the customer who owns it to customer, with a reason, records the transfer in both customers' transfer history and follows both customers' plans. Transferring a purchase to the customer who owns it changes nothing. Needs customers:write.
curl -X POST 'https://api.entitler.co/v1/customers/ada/purchase-transfers' \
-H "Authorization: Bearer $ENTITLER_KEY" \
-H "Content-Type: application/json" \
-d '{"purchase":{"appStore":{"connectionId":"connectionId","originalTransactionId":"originalTransactionId"}},"reason":"reason","target":{"environmentId":"environmentId","projectId":"projectId","teamId":"teamId"}}'Credentials
Send any one of these:
- Bearer token
Path parameters
| Name | Type | Description |
|---|---|---|
external_idrequired | string | The customer's external ID, or me for the customer a customer token or identity token names. |
Request body
object
purchasePurchaseRef-InputappStoreAppStorePurchaseRef-InputconnectionIdstringoriginalTransactionIdstring
reasonstringtargetProductTargetenvironmentIdstringprojectIdstringteamIdstring
Responses
200The TransferPurchaseResponse message.
TransferPurchaseResponse
outcomePurchaseTransferOutcomerequiredOne of
PURCHASE_TRANSFER_OUTCOME_UNSPECIFIED,PURCHASE_TRANSFER_OUTCOME_TRANSFERRED,PURCHASE_TRANSFER_OUTCOME_UNCHANGED.transferPurchaseTransferactorcommon.Actoridstringrequiredtypecommon.ActorTyperequiredOne of
ACTOR_TYPE_UNSPECIFIED,ACTOR_TYPE_USER,ACTOR_TYPE_KEY,ACTOR_TYPE_SYSTEM.
atintegerrequiredat least 0; at most 18446744073709552000
fromExternalIdstringrequiredidstringrequiredkindPurchaseTransferKindrequiredOne of
PURCHASE_TRANSFER_KIND_UNSPECIFIED,PURCHASE_TRANSFER_KIND_RESTORE,PURCHASE_TRANSFER_KIND_SUPPORT.purchasePurchaseRefappStoreAppStorePurchaseRefconnectionIdstringrequiredoriginalTransactionIdstringrequired
reasonstringtoExternalIdstringrequired
ErrorA refusal, with the HTTP status of its gRPC code.
Error
errorobjectrequiredcodestringrequiredparametersobjectrequiredEach value: string
reasonstringor nullrequired